55 runs-on : ubuntu-latest
66 strategy :
77 matrix :
8- python : [3.6, 3.7, 3.8]
8+ python : [" 3.6", " 3.7", " 3.8", "3.9" ]
99 name : Python ${{ matrix.python }} tests
1010 steps :
1111 - name : Checkout branch
@@ -17,17 +17,31 @@ jobs:
1717 python-version : ${{ matrix.python }}
1818
1919 - name : Install poetry
20- uses : snok/install-poetry@v1.1.1
20+ uses : snok/install-poetry@v1
2121 with :
22- version : 1.1.4
23- create_virtualenvs : true
22+ version : 1.1.10
23+ virtualenvs-create : true
24+ virtualenvs-in-project : true
25+ installer-parallel : true
26+
27+ - name : Load cached venv
28+ id : cached-poetry-dependencies
29+ uses : actions/cache@v2
30+ with :
31+ path : .venv
32+ key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
2433
2534 - name : Install dependencies
26- run : poetry install
35+ if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
36+ run : poetry install --no-interaction --no-root
37+
38+ - name : Install library
39+ run : poetry install --no-interaction
2740
2841 - name : Run tests and generate coverage report
2942 run : |
30- poetry run pytest tests/ --cov=./ --cov-report=xml
43+ source .venv/bin/activate
44+ pytest tests/ --cov=./ --cov-report=xml
3145
3246 - name : Upload coverage to Codecov
3347 uses : codecov/codecov-action@v1
0 commit comments