|
6 | 6 | workflow_dispatch:
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - build: |
10 |
| - |
| 9 | + test-run: |
11 | 10 | runs-on: ubuntu-latest
|
12 | 11 | strategy:
|
13 | 12 | matrix:
|
14 |
| - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 13 | + include: |
| 14 | + - python-version: "3.7" |
| 15 | + toxfactor: py37 |
| 16 | + ignore-typecheck-outcome: true |
| 17 | + ignore-test-outcome: false |
| 18 | + - python-version: "3.8" |
| 19 | + toxfactor: py38 |
| 20 | + ignore-typecheck-outcome: true |
| 21 | + ignore-test-outcome: false |
| 22 | + - python-version: "3.9" |
| 23 | + toxfactor: py39 |
| 24 | + ignore-typecheck-outcome: true |
| 25 | + ignore-test-outcome: false |
| 26 | + - python-version: "3.10" |
| 27 | + toxfactor: py310 |
| 28 | + ignore-typecheck-outcome: true |
| 29 | + ignore-test-outcome: false |
| 30 | + - python-version: "3.11" |
| 31 | + toxfactor: py311 |
| 32 | + ignore-typecheck-outcome: true |
| 33 | + ignore-test-outcome: false |
| 34 | + - python-version: "3.12.0-alpha.3" |
| 35 | + toxfactor: py312 |
| 36 | + ignore-typecheck-outcome: true |
| 37 | + ignore-test-outcome: true |
15 | 38 |
|
16 | 39 | steps:
|
17 | 40 | - uses: actions/checkout@v3
|
| 41 | + |
18 | 42 | - name: Set up Python ${{ matrix.python-version }}
|
19 | 43 | uses: actions/setup-python@v4
|
| 44 | + id: setup-python |
20 | 45 | with:
|
21 | 46 | python-version: ${{ matrix.python-version }}
|
22 |
| - - name: Install dependencies |
| 47 | + |
| 48 | + - name: Install poetry |
| 49 | + run: | |
| 50 | + python -m pip install poetry==1.3.1 |
| 51 | +
|
| 52 | + - name: Configure poetry |
| 53 | + run: | |
| 54 | + python -m poetry config virtualenvs.in-project true |
| 55 | +
|
| 56 | + - name: Cache the virtualenv |
| 57 | + id: poetry-dependencies-cache |
| 58 | + uses: actions/cache@v3 |
| 59 | + with: |
| 60 | + path: ./.venv |
| 61 | + key: ${{ runner.os }}-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} |
| 62 | + |
| 63 | + - name: Install dev dependencies |
| 64 | + if: steps.poetry-dependencies-cache.outputs.cache-hit != 'true' |
23 | 65 | run: |
|
24 |
| - python -m pip install --upgrade pip |
25 |
| - pip install -U setuptools |
26 |
| - pip install tox coverage[toml] |
| 66 | + python -m poetry install --only=dev |
| 67 | +
|
27 | 68 | - name: Type checking
|
28 |
| - continue-on-error: true |
| 69 | + # Ignore errors for older pythons |
| 70 | + continue-on-error: ${{ matrix.ignore-typecheck-outcome }} |
29 | 71 | run: |
|
| 72 | + source .venv/bin/activate |
30 | 73 | tox -e mypy
|
| 74 | +
|
31 | 75 | - name: Test with tox
|
32 |
| - env: |
33 |
| - TOX_PARALLEL_NO_SPINNER: 1 |
| 76 | + continue-on-error: ${{ matrix.ignore-test-outcome }} |
34 | 77 | run: |
|
| 78 | + source .venv/bin/activate |
35 | 79 | coverage erase
|
36 |
| - tox --parallel |
| 80 | + tox run-parallel -f ${{ matrix.toxfactor }} --parallel-no-spinner --parallel-live |
37 | 81 | coverage combine
|
38 | 82 | coverage xml
|
| 83 | +
|
39 | 84 | - uses: codecov/codecov-action@v3
|
40 | 85 | with:
|
41 | 86 | fail_ci_if_error: true
|
|
0 commit comments