11# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33
4- name : Python package
4+ name : Test
55
66on :
77 push :
8- branches : [ master ]
8+ branches : [ master, dev ]
99 pull_request :
10- branches : [ master ]
10+
1111
1212jobs :
1313 build :
1414
15- runs-on : ubuntu-latest
15+ runs-on : ${{ matrix.os }}
1616 strategy :
1717 fail-fast : false
1818 matrix :
19- python-version : ["3.7", "3.8", "3.9", "3.10"]
19+ python-version : ["3.7", "3.8", "3.9", "3.10", "3.11.0-alpha - 3.11.0"]
20+ os : ["ubuntu-latest", "windows-latest", "macos-latest"]
2021
2122 steps :
2223 - uses : actions/checkout@v2
@@ -27,14 +28,21 @@ jobs:
2728 - name : Install dependencies
2829 run : |
2930 python -m pip install --upgrade pip
30- python -m pip install flake8 pytest
31+ python -m pip install flake8
3132 pip install tox tox-gh-actions
32- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+ pip install -r requirements-dev .txt
3334 - name : Lint with flake8
3435 run : |
3536 # stop the build if there are Python syntax errors or undefined names
3637 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3738 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3839 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3940 - name : Run tox with tox-gh-actions
40- run : tox
41+ run : tox -e py
42+
43+ - name : Upload coverage
44+ uses : codecov/codecov-action@v2
45+ with :
46+ files : ./coverage.xml # optional
47+ fail_ci_if_error : true # optional (default = false)
48+ verbose : true # optional (default = false)
0 commit comments