|
11 | 11 | strategy: |
12 | 12 | fail-fast: false |
13 | 13 | matrix: |
14 | | - python-version: ["3.9"] |
| 14 | + python-version: ["pypy-3.6", "pypy-3.7", "3.6", "3.7", "3.8", "3.9"] |
| 15 | + tox-extra-versions: [ |
| 16 | + "pytest46-xdist127", |
| 17 | + "pytest46-xdist133", |
| 18 | + "pytest54-xdist133", |
| 19 | + "pytest62-xdist202", |
| 20 | + ] |
| 21 | + include: |
| 22 | + # Add new helper variables to existing jobs |
| 23 | + - {python-version: "pypy-3.6", tox-python-version: "pypy3"} |
| 24 | + - {python-version: "pypy-3.7", tox-python-version: "pypy3"} |
| 25 | + - {python-version: "3.6", tox-python-version: "py36"} |
| 26 | + - {python-version: "3.7", tox-python-version: "py37"} |
| 27 | + - {python-version: "3.8", tox-python-version: "py38"} |
| 28 | + - {python-version: "3.9", tox-python-version: "py39"} |
| 29 | + exclude: |
| 30 | + # Remove some jobs from the matrix |
| 31 | + - {tox-extra-versions: "pytest46-xdist127", python-version: "3.8"} |
| 32 | + - {tox-extra-versions: "pytest46-xdist127", python-version: "3.9"} |
| 33 | + - {tox-extra-versions: "pytest46-xdist133", python-version: "3.9"} |
| 34 | + - {tox-extra-versions: "pytest54-xdist133", python-version: "3.9"} |
15 | 35 |
|
16 | 36 | steps: |
17 | 37 | - uses: actions/checkout@v2 |
|
21 | 41 | with: |
22 | 42 | python-version: ${{ matrix.python-version }} |
23 | 43 |
|
24 | | - - name: Hello world |
| 44 | + - name: Get pip cache dir |
| 45 | + id: pip-cache |
25 | 46 | run: | |
26 | | - echo "hello world" |
| 47 | + echo "::set-output name=dir::$(pip cache dir)" |
| 48 | +
|
| 49 | + - name: Cache |
| 50 | + uses: actions/cache@v2 |
| 51 | + with: |
| 52 | + path: ${{ steps.pip-cache.outputs.dir }} |
| 53 | + key: |
| 54 | + test-${{ matrix.python-version }}-v1-${{ hashFiles('**/requirements.txt') }} |
| 55 | + restore-keys: | |
| 56 | + test-${{ matrix.python-version }}-v1- |
| 57 | +
|
| 58 | + - name: Install dependencies |
| 59 | + run: | |
| 60 | + python -m pip install -U pip |
| 61 | + python -m pip install -U wheel |
| 62 | + python -m pip install --progress-bar=off tox -rci/requirements.txt |
| 63 | + virtualenv --version |
| 64 | + pip --version |
| 65 | + tox --version |
| 66 | +
|
| 67 | + - name: Tox tests |
| 68 | + run: | |
| 69 | + tox -v -e ${{ matrix.tox-python-version }}-${{ matrix.tox-extra-versions }}-coverage55 |
| 70 | +
|
| 71 | + allgood: |
| 72 | + needs: test |
| 73 | + runs-on: ubuntu-latest |
| 74 | + name: Test successful |
| 75 | + steps: |
| 76 | + - name: Success |
| 77 | + run: echo Test successful |
0 commit comments