|
1 | 1 | name: Tests
|
2 | 2 | on:
|
3 | 3 | push:
|
4 |
| - branches: |
5 |
| - - main |
6 |
| - - pallets |
7 |
| - paths-ignore: |
8 |
| - - 'docs/**' |
9 |
| - - '*.md' |
10 |
| - - '*.rst' |
| 4 | + branches: [main, stable] |
| 5 | + paths-ignore: ['docs/**', '*.md', '*.rst'] |
11 | 6 | pull_request:
|
12 |
| - branches: |
13 |
| - - main |
14 |
| - paths-ignore: |
15 |
| - - 'docs/**' |
16 |
| - - '*.md' |
17 |
| - - '*.rst' |
| 7 | + paths-ignore: [ 'docs/**', '*.md', '*.rst' ] |
18 | 8 | jobs:
|
19 | 9 | tests:
|
20 |
| - name: ${{ matrix.name }} |
21 |
| - runs-on: ${{ matrix.os }} |
| 10 | + name: ${{ matrix.name || matrix.python }} |
| 11 | + runs-on: ${{ matrix.os || 'ubuntu-latest' }} |
22 | 12 | strategy:
|
23 | 13 | fail-fast: false
|
24 | 14 | matrix:
|
25 | 15 | include:
|
26 |
| - - {name: Linux, python: '3.13', os: ubuntu-latest, tox: py313} |
27 |
| - - {name: Windows, python: '3.13', os: windows-latest, tox: py313} |
28 |
| - - {name: Mac, python: '3.13', os: macos-latest, tox: py313} |
29 |
| - - {name: '3.13', python: '3.13', os: ubuntu-latest, tox: py313} |
30 |
| - - {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312} |
31 |
| - - {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311} |
32 |
| - - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} |
33 |
| - - {name: Typing, python: '3.13', os: ubuntu-latest, tox: mypy} |
34 |
| - - {name: Package, python: '3.13', os: ubuntu-latest, tox: package} |
35 |
| - - {name: Lint, python: '3.13', os: ubuntu-latest, tox: pep8} |
36 |
| - - {name: Format, python: '3.13', os: ubuntu-latest, tox: format} |
| 16 | + - {python: '3.13'} |
| 17 | + - {name: Windows, python: '3.13', os: windows-latest} |
| 18 | + - {name: Mac, python: '3.13', os: macos-latest} |
| 19 | + - {python: '3.12'} |
| 20 | + - {python: '3.11'} |
| 21 | + - {python: '3.10'} |
| 22 | + - {python: '3.9'} |
37 | 23 | steps:
|
38 |
| - - uses: actions/checkout@v4 |
39 |
| - - uses: actions/setup-python@v5 |
| 24 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 25 | + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 |
40 | 26 | with:
|
41 | 27 | python-version: ${{ matrix.python }}
|
42 |
| - - name: update pip |
43 |
| - run: | |
44 |
| - pip install -U wheel |
45 |
| - pip install -U setuptools |
46 |
| - python -m pip install -U pip |
| 28 | + allow-prereleases: true |
| 29 | + cache: pip |
| 30 | + cache-dependency-path: requirements*/*.txt |
| 31 | + - run: pip install tox |
| 32 | + - run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }} |
| 33 | + typing: |
| 34 | + runs-on: ubuntu-latest |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
| 37 | + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 |
| 38 | + with: |
| 39 | + python-version: '3.x' |
| 40 | + cache: pip |
| 41 | + cache-dependency-path: requirements*/*.txt |
47 | 42 | - name: cache mypy
|
48 |
| - uses: actions/cache@v4.0.0 |
| 43 | + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 |
49 | 44 | with:
|
50 | 45 | path: ./.mypy_cache
|
51 |
| - key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }} |
52 |
| - if: matrix.tox == 'typing' |
| 46 | + key: mypy|${{ hashFiles('pyproject.toml') }} |
53 | 47 | - run: pip install tox
|
54 |
| - - run: tox -e ${{ matrix.tox }} |
| 48 | + - run: tox run -e typing |
0 commit comments