|
1 | 1 | name: CI |
2 | 2 |
|
| 3 | +permissions: |
| 4 | + contents: read |
| 5 | + |
3 | 6 | on: |
4 | 7 | workflow_dispatch: |
5 | 8 | pull_request: |
|
17 | 20 | FORCE_COLOR: 3 |
18 | 21 |
|
19 | 22 | jobs: |
20 | | - pre-commit-and-lint: |
21 | | - name: Format |
| 23 | + lint: |
| 24 | + name: Lint |
22 | 25 | runs-on: ubuntu-latest |
23 | 26 | steps: |
24 | | - - uses: actions/checkout@v4 |
| 27 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
25 | 28 | with: |
26 | 29 | fetch-depth: 0 |
27 | | - - uses: actions/setup-python@v5 |
28 | | - with: |
29 | | - python-version: "3.x" |
30 | | - - uses: pre-commit/action@v3.0.1 |
31 | | - with: |
32 | | - extra_args: --hook-stage manual --all-files |
33 | | - - uses: prefix-dev/setup-pixi@v0.8.3 |
| 30 | + |
| 31 | + - uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0 |
34 | 32 | with: |
35 | | - pixi-version: v0.40.3 |
| 33 | + pixi-version: v0.50.2 |
36 | 34 | cache: true |
37 | 35 | environments: lint |
38 | | - - name: Run Pylint, Mypy & Pyright |
39 | | - run: | |
40 | | - pixi run -e lint pylint |
41 | | - pixi run -e lint mypy |
42 | | - pixi run -e lint pyright |
| 36 | + |
| 37 | + - name: Lint (if this step fails, please 'pixi run lint' locally and push the changes) |
| 38 | + run: pixi run -e lint lint |
43 | 39 |
|
44 | 40 | checks: |
45 | | - name: Check ${{ matrix.environment }} |
| 41 | + name: Test ${{ matrix.environment }} |
46 | 42 | runs-on: ${{ matrix.runs-on }} |
47 | | - needs: [pre-commit-and-lint] |
48 | 43 | strategy: |
49 | 44 | fail-fast: false |
50 | 45 | matrix: |
51 | | - environment: [tests-py310, tests-py313, tests-backends] |
| 46 | + environment: |
| 47 | + - tests-py310 |
| 48 | + - tests-py313 |
| 49 | + - tests-numpy1 |
| 50 | + - tests-backends |
| 51 | + - tests-backends-py310 |
| 52 | + - tests-nogil |
52 | 53 | runs-on: [ubuntu-latest] |
53 | 54 |
|
54 | 55 | steps: |
55 | | - - uses: actions/checkout@v4 |
| 56 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
56 | 57 | with: |
57 | 58 | fetch-depth: 0 |
58 | 59 |
|
59 | | - - uses: prefix-dev/setup-pixi@v0.8.3 |
| 60 | + - uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293 # v0.9.0 |
60 | 61 | with: |
61 | | - pixi-version: v0.40.3 |
| 62 | + pixi-version: v0.50.2 |
62 | 63 | cache: true |
63 | 64 | environments: ${{ matrix.environment }} |
64 | 65 |
|
65 | 66 | - name: Test package |
| 67 | + # Save some time; also at the moment of writing coverage crashes on python 3.13t |
| 68 | + if: ${{ matrix.environment != 'tests-nogil' }} |
66 | 69 | run: pixi run -e ${{ matrix.environment }} tests-ci |
67 | 70 |
|
| 71 | + - name: Test free-threading |
| 72 | + if: ${{ matrix.environment == 'tests-nogil' }} |
| 73 | + run: pixi run -e tests-nogil tests --parallel-threads=4 |
| 74 | + |
68 | 75 | - name: Upload coverage report |
69 | | - uses: codecov/codecov-action@v5.3.1 |
| 76 | + if: ${{ matrix.environment != 'tests-nogil' }} |
| 77 | + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 |
70 | 78 | with: |
71 | 79 | token: ${{ secrets.CODECOV_TOKEN }} |
0 commit comments