|
1 | 1 | # This does code inspection and checks to make sure building of docs works |
2 | 2 |
|
3 | | -name: GitHub based tests |
4 | | - |
5 | 3 | on: |
6 | 4 | push: |
7 | 5 | branches: [development, maintenance] |
|
12 | 10 | jobs: |
13 | 11 |
|
14 | 12 | build: |
15 | | - name: Code inspections |
16 | | - runs-on: ${{ matrix.os }} |
17 | | - |
18 | | - strategy: |
19 | | - matrix: |
20 | | - os: [ubuntu-latest] |
21 | | - python-version: ['3.12'] |
22 | | - architecture: ['x64'] |
| 13 | + name: Code Inspections |
| 14 | + runs-on: ubuntu-latest |
23 | 15 |
|
24 | 16 | steps: |
25 | | - - uses: actions/checkout@v4 |
26 | | - - name: setup |
| 17 | + - uses: actions/checkout@v5 |
| 18 | + |
| 19 | + - name: Setup Python |
27 | 20 | uses: actions/setup-python@v5 |
28 | 21 | with: |
29 | | - python-version: ${{ matrix.python-version }} |
30 | | - architecture: ${{ matrix.architecture }} |
| 22 | + python-version: '3.14' |
| 23 | + |
| 24 | + - name: Install UV |
| 25 | + uses: astral-sh/setup-uv@v7 |
| 26 | + with: |
| 27 | + enable-cache: true |
| 28 | + |
| 29 | + - name: Sync UV project |
| 30 | + run: uv sync |
| 31 | + |
| 32 | + - name: Formatting (Ruff) |
| 33 | + run: uv run make.py format --check |
| 34 | + |
| 35 | + - name: Linting (Ruff) |
| 36 | + run: uv run make.py ruff-check |
| 37 | + |
| 38 | + - name: Type Checking (MyPy) |
| 39 | + run: uv run make.py mypy |
| 40 | + |
| 41 | + - name: Type Checking (Pyright) |
| 42 | + run: uv run make.py pyright |
31 | 43 |
|
32 | | - - name: dependencies |
33 | | - run: | |
34 | | - python -m pip install -U pip wheel setuptools |
35 | | - - name: wheel |
36 | | - id: wheel |
37 | | - run: | |
38 | | - python -m pip install -e .[dev] |
39 | | - - name: "code-inspection: formatting" |
40 | | - if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }} |
41 | | - run: | |
42 | | - python ./make.py format --check |
43 | | - - name: "code-inspection: ruff-check" |
44 | | - if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }} |
45 | | - run: | |
46 | | - python ./make.py ruff-check |
47 | | - - name: "code-inspection: mypy" |
48 | | - if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }} |
49 | | - run: | |
50 | | - python ./make.py mypy |
51 | | - - name: "code-inspection: pyright" |
52 | | - if: ${{ (success() || failure()) && steps.wheel.outcome == 'success' }} |
53 | | - run: | |
54 | | - python ./make.py pyright |
55 | 44 | # Prepare the Pull Request Payload artifact. If this fails, |
56 | 45 | # we fail silently using the `continue-on-error` option. It's |
57 | 46 | # nice if this succeeds, but if it fails for any reason, it |
58 | 47 | # does not mean that our lint-test checks failed. |
59 | 48 | - name: Prepare Pull Request Payload artifact |
60 | 49 | id: prepare-artifact |
61 | | - if: always() && github.event_name == 'pull_request' |
| 50 | + if: github.event_name == 'pull_request' |
62 | 51 | continue-on-error: true |
63 | 52 | run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json |
64 | 53 |
|
|
67 | 56 | # `continue-on-error` conclusion is applied, we use the |
68 | 57 | # `.outcome` value. This step also fails silently. |
69 | 58 | - name: Upload a Build Artifact |
70 | | - if: always() && steps.prepare-artifact.outcome == 'success' |
| 59 | + if: steps.prepare-artifact.outcome == 'success' |
71 | 60 | continue-on-error: true |
72 | 61 | uses: actions/upload-artifact@v4 |
73 | 62 | with: |
|
0 commit comments