|
9 | 9 | - '*.md'
|
10 | 10 | - '*.rst'
|
11 | 11 | pull_request:
|
12 |
| - branches: |
13 |
| - - main |
14 |
| - - '*.x' |
15 | 12 | paths-ignore:
|
16 | 13 | - 'docs/**'
|
17 | 14 | - '*.md'
|
18 | 15 | - '*.rst'
|
19 | 16 | jobs:
|
20 | 17 | tests:
|
21 |
| - name: ${{ matrix.name }} |
22 |
| - runs-on: ${{ matrix.os }} |
| 18 | + name: ${{ matrix.name || matrix.python }} |
| 19 | + runs-on: ${{ matrix.os || 'ubuntu-latest' }} |
23 | 20 | strategy:
|
24 | 21 | fail-fast: false
|
25 | 22 | matrix:
|
26 | 23 | include:
|
27 |
| - - {name: Linux, python: '3.11', os: ubuntu-latest, tox: py311} |
28 |
| - - {name: Windows, python: '3.11', os: windows-latest, tox: py311} |
29 |
| - - {name: Mac, python: '3.11', os: macos-latest, tox: py311} |
30 |
| - - {name: '3.12-dev', python: '3.12-dev', os: ubuntu-latest, tox: py312} |
31 |
| - - {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310} |
32 |
| - - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} |
33 |
| - - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} |
34 |
| - - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37} |
35 |
| - - {name: 'PyPy', python: 'pypy-3.10', os: ubuntu-latest, tox: pypy310} |
36 |
| - - {name: Typing, python: '3.11', os: ubuntu-latest, tox: typing} |
| 24 | + - {python: '3.12'} |
| 25 | + - {name: Windows, python: '3.12', os: windows-latest} |
| 26 | + - {name: Mac, python: '3.12', os: macos-latest} |
| 27 | + - {python: '3.11'} |
| 28 | + - {python: '3.10'} |
| 29 | + - {python: '3.9'} |
| 30 | + - {python: '3.8'} |
| 31 | + - {python: '3.7'} |
| 32 | + - {name: PyPy, python: 'pypy-3.10', tox: pypy310} |
37 | 33 | steps:
|
38 |
| - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c |
39 |
| - - uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912 |
| 34 | + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 |
| 35 | + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 |
40 | 36 | with:
|
41 | 37 | python-version: ${{ matrix.python }}
|
42 |
| - cache: 'pip' |
43 |
| - cache-dependency-path: 'requirements/*.txt' |
44 |
| - - name: update pip |
45 |
| - run: | |
46 |
| - pip install -U wheel |
47 |
| - pip install -U setuptools |
48 |
| - python -m pip install -U pip |
| 38 | + allow-prereleases: true |
| 39 | + cache: pip |
| 40 | + cache-dependency-path: requirements*/*.txt |
| 41 | + - run: pip install tox |
| 42 | + - run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }} |
| 43 | + typing: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 |
| 47 | + - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 |
| 48 | + with: |
| 49 | + python-version: '3.x' |
| 50 | + cache: pip |
| 51 | + cache-dependency-path: requirements*/*.txt |
49 | 52 | - name: cache mypy
|
50 |
| - uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 |
| 53 | + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 |
51 | 54 | with:
|
52 | 55 | path: ./.mypy_cache
|
53 |
| - key: mypy|${{ matrix.python }}|${{ hashFiles('setup.cfg') }} |
54 |
| - if: matrix.tox == 'typing' |
| 56 | + key: mypy|${{ hashFiles('pyproject.toml') }} |
55 | 57 | - run: pip install tox
|
56 |
| - - run: tox run -e ${{ matrix.tox }} |
| 58 | + - run: tox run -e typing |
0 commit comments