Skip to content

Commit

Permalink
feat: add github actions for testing and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jnoortheen committed Mar 15, 2020
1 parent 0d54b5c commit d9ea90d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python package

on: [push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: abatilo/actions-poetry@v1.5.0
with:
python-version: ${{ matrix.python-version }}
poetry_version: 1.0.5
args: install
run:
- pip install tox-gh-actions
- name: Test with tox
run:
- tox

lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.8
uses: abatilo/actions-poetry@v1.5.0
with:
python-version: 3.8
poetry_version: 1.0.5
args: install
- name: Lint
run: make check
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ test-all: install
@ if test -e $(FAILURES); then poetry run pytest $(PACKAGES) $(PYTEST_RERUN_OPTIONS); fi
@ rm -rf $(FAILURES)
poetry run pytest $(PACKAGES) $(PYTEST_OPTIONS)
poetry run coveragespace $(REPOSITORY) overall

.PHONY: read-coverage
read-coverage:
Expand Down
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
envlist = py35,py36,py37,py38
skipsdist = True

[gh-actions]
python =
3.5: py35
3.6: py36
3.7: py37
3.8: py38

[testenv]
whitelist_externals = poetry
skip_install = true
Expand Down

0 comments on commit d9ea90d

Please sign in to comment.