@@ -2,9 +2,9 @@ name: dev workflow
22
33on :
44 push :
5- branches : [ master, main ]
5+ branches : [master, main]
66 pull_request :
7- branches : [ master, main ]
7+ branches : [master, main]
88
99 # Allows you to run this workflow manually from the Actions tab
1010 workflow_dispatch :
@@ -13,25 +13,40 @@ jobs:
1313 test :
1414 strategy :
1515 matrix :
16- python-versions : [3.6, 3.7, 3.8, 3.9]
16+ python-versions : ["3.8", " 3.9" ]
1717 os : [ubuntu-18.04, macos-latest, windows-latest]
1818 runs-on : ${{ matrix.os }}
1919
2020 steps :
21- - uses : actions/checkout@v2
22- - uses : actions/setup-python@v2
21+ - uses : actions/checkout@v3
22+ - uses : actions/setup-python@v4
2323 with :
2424 python-version : ${{ matrix.python-versions }}
2525
26+ - name : Install Poetry
27+ uses : snok/install-poetry@v1
28+ with :
29+ virtualenvs-create : true
30+ virtualenvs-in-project : true
31+
32+ - name : Load cached venv
33+ id : cached-poetry-dependencies
34+ uses : actions/cache@v3
35+ with :
36+ path : ~/.cache
37+ key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
38+
2639 - name : Install dependencies
27- run : |
28- python -m pip install --upgrade pip
29- pip install poetry tox tox-gh-actions
30- poetry install
40+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
41+ run : poetry install --no-interaction --no-root
42+
43+ - name : Install package
44+ run : poetry install --no-interaction
3145
32- - name : test with tox
33- run :
34- tox
46+ - name : Run tests
47+ run : |
48+ source $VENV
49+ poetry run pytest tests
3550
3651 - name : list files
3752 run : ls -l .
0 commit comments