@@ -15,19 +15,34 @@ jobs:
1515 matrix :
1616 os : [ubuntu-latest, macos-latest, windows-latest]
1717 python-version : [3.6, 3.7, 3.8, 3.9, pypy3]
18+ include :
19+ - os : ubuntu-latest
20+ venvcmd : . env/bin/activate
21+ - os : macos-latest
22+ venvcmd : . env/bin/activate
23+ - os : windows-latest
24+ venvcmd : env\Scripts\Activate.ps1
1825 steps :
19- - uses : actions/checkout@v2
20- - name : Set up Python ${{ matrix.python-version }}
21- uses : actions/setup-python@v2
22- with :
23- python-version : ${{ matrix.python-version }}
24- - name : Install dependencies
25- run : |
26- pip install --upgrade -r requirements-dev.txt
27- pip install .
28- - name : Install pytest-github-actions-annotate-failures plugin
29- run : pip install pytest-github-actions-annotate-failures
30- - name : Run tests
31- run : make ci
32- - name : Report coverage to Codecov
33- uses : codecov/codecov-action@v1
26+ - uses : actions/checkout@v2
27+ - uses : actions/cache@v2
28+ id : cache
29+ with :
30+ path : env
31+ key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements-dev.txt') }}-${{ hashFiles('**/Makefile') }}
32+ restore-keys : |
33+ ${{ runner.os }}-pip-
34+ - name : Set up Python ${{ matrix.python-version }}
35+ uses : actions/setup-python@v2
36+ with :
37+ python-version : ${{ matrix.python-version }}
38+ - name : Install dependencies
39+ run : |
40+ python -m venv env
41+ ${{ matrix.venvcmd }}
42+ pip install --upgrade -r requirements-dev.txt pytest-github-actions-annotate-failures
43+ - name : Run tests
44+ run : |
45+ ${{ matrix.venvcmd }}
46+ make ci
47+ - name : Report coverage to Codecov
48+ uses : codecov/codecov-action@v1
0 commit comments