55 branches :
66 - master
77 paths :
8+ - ' pyproject.toml'
9+ - ' poetry.lock'
810 - ' **.py'
911 - ' .github/workflows/python-tests.yml'
1012 - ' .coveragerc'
11-
13+
1214 pull_request :
1315 branches :
1416 - master
1517 paths :
18+ - ' pyproject.toml'
19+ - ' poetry.lock'
1620 - ' **.py'
1721 - ' .github/workflows/python-tests.yml'
1822 - ' .coveragerc'
@@ -28,29 +32,32 @@ jobs:
2832 steps :
2933 - uses : actions/checkout@v3
3034
35+ - name : Install poetry
36+ run : pipx install poetry
37+
3138 - name : Set up Python ${{ matrix.python-version }}
3239 uses : actions/setup-python@v4
3340 with :
3441 python-version : ${{ matrix.python-version }}
42+ cache : " poetry"
43+ cache-dependency-path : poetry.lock
3544
36- - name : Install the module
37- run : pip install -e .
38-
39- - name : Install dev dependencies
40- run : pip install flake8 dawg2 pytest pytest-cov coveralls
45+ - name : Install dependencies
46+ run : poetry install
4147
4248 - name : Lint with flake8
4349 run : |
4450 # stop the build if there are Python syntax errors or undefined names
45- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
51+ poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4652 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
47- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
53+ poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
4854
4955 - name : Test with pytest
50- run : pytest --cov=./
56+ run : poetry run pytest --cov=./
5157
5258 - name : Upload coverage data to coveralls.io
5359 run : |
60+ pip install coveralls
5461 coveralls --service=github
5562 env :
5663 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments