|
4 | 4 | name: Test Python Code |
5 | 5 |
|
6 | 6 | on: |
7 | | - pull_request: |
8 | | - paths: |
9 | | - - 'src/**/*.py' |
10 | | - - 'tests/**/*.py' |
11 | | - - 'noxfile.py' |
12 | | - - 'pyproject.toml' |
13 | | - - '.coveragerc' |
14 | | - - '.github/workflows/test-python.yml' |
15 | | - push: |
16 | | - branches: |
17 | | - - main |
18 | | - - master |
19 | | - paths: |
20 | | - - 'src/**/*.py' |
21 | | - - 'tests/**/*.py' |
22 | | - - 'noxfile.py' |
23 | | - - 'pyproject.toml' |
24 | | - - '.coveragerc' |
25 | | - - '.github/workflows/test-python.yml' |
| 7 | + pull_request: |
| 8 | + paths: |
| 9 | + - "src/**/*.py" |
| 10 | + - "tests/**/*.py" |
| 11 | + - "noxfile.py" |
| 12 | + - "pyproject.toml" |
| 13 | + - ".coveragerc" |
| 14 | + - ".github/workflows/test-python.yml" |
| 15 | + push: |
| 16 | + branches: |
| 17 | + - main |
| 18 | + - master |
| 19 | + paths: |
| 20 | + - "src/**/*.py" |
| 21 | + - "tests/**/*.py" |
| 22 | + - "noxfile.py" |
| 23 | + - "pyproject.toml" |
| 24 | + - ".coveragerc" |
| 25 | + - ".github/workflows/test-python.yml" |
26 | 26 |
|
27 | | - workflow_dispatch: |
| 27 | + workflow_dispatch: |
28 | 28 |
|
29 | 29 | jobs: |
30 | | - test-python: |
31 | | - name: Run Python Tests on ${{ matrix.os }}/${{ matrix.python-version }} |
32 | | - runs-on: ${{ matrix.os }} |
33 | | - strategy: |
34 | | - matrix: |
35 | | - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
36 | | - os: [ubuntu-latest, windows-latest, macos-latest] |
| 30 | + test-python: |
| 31 | + name: Run Python Tests on ${{ matrix.os }}/${{ matrix.python-version }} |
| 32 | + runs-on: ${{ matrix.os }} |
| 33 | + strategy: |
| 34 | + matrix: |
| 35 | + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
| 36 | + os: [ubuntu-latest, windows-latest, macos-latest] |
37 | 37 |
|
38 | | - steps: |
39 | | - - name: Checkout code |
40 | | - uses: actions/checkout@v4 |
| 38 | + steps: |
| 39 | + - name: Checkout code |
| 40 | + uses: actions/checkout@v4 |
41 | 41 |
|
42 | | - - name: Install uv |
43 | | - uses: astral-sh/setup-uv@v6 |
| 42 | + - name: Install uv |
| 43 | + uses: astral-sh/setup-uv@v6 |
44 | 44 |
|
45 | | - - name: Set up Python |
46 | | - uses: actions/setup-python@v5 |
47 | | - with: |
48 | | - python-version: ${{ matrix.python-version }} |
| 45 | + - name: Set up Python |
| 46 | + uses: actions/setup-python@v5 |
| 47 | + with: |
| 48 | + python-version: ${{ matrix.python-version }} |
49 | 49 |
|
50 | | - - name: Run test suite |
51 | | - run: uvx nox -s test-python |
| 50 | + - name: Run test suite |
| 51 | + run: uvx nox -s test-python |
52 | 52 |
|
53 | | - - name: Upload test reports |
54 | | - uses: actions/upload-artifact@v4 |
55 | | - with: |
56 | | - name: test-results-${{ matrix.os }}-py${{ matrix.python-version }} |
57 | | - path: test-results/*.xml |
58 | | - retention-days: 5 |
| 53 | + - name: Upload test reports |
| 54 | + uses: actions/upload-artifact@v4 |
| 55 | + with: |
| 56 | + name: test-results-${{ matrix.os }}-py${{ matrix.python-version }} |
| 57 | + path: tests/results/*.xml |
| 58 | + retention-days: 5 |
59 | 59 |
|
60 | | - - name: Upload coverage report |
61 | | - uses: actions/upload-artifact@v4 |
62 | | - with: |
63 | | - name: coverage-report-${{ matrix.os }}-py${{ matrix.python-version }} |
64 | | - path: coverage.xml |
65 | | - retention-days: 5 |
| 60 | + - name: Upload coverage report |
| 61 | + uses: actions/upload-artifact@v4 |
| 62 | + with: |
| 63 | + name: coverage-report-${{ matrix.os }}-py${{ matrix.python-version }} |
| 64 | + path: coverage.xml |
| 65 | + retention-days: 5 |
0 commit comments