Skip to content

Commit 9c3d429

Browse files
committed
more actions improvements
1 parent fed1c29 commit 9c3d429

File tree

1 file changed

+28
-39
lines changed

1 file changed

+28
-39
lines changed

.github/workflows/code_quality.yml

Lines changed: 28 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# This does code inspection and checks to make sure building of docs works
22

3-
name: GitHub based tests
4-
53
on:
64
push:
75
branches: [development, maintenance]
@@ -12,53 +10,44 @@ on:
1210
jobs:
1311

1412
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
2315

2416
steps:
25-
- uses: actions/checkout@v4
26-
- name: setup
17+
- uses: actions/checkout@v5
18+
19+
- name: Setup Python
2720
uses: actions/setup-python@v5
2821
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
3143

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
5544
# Prepare the Pull Request Payload artifact. If this fails,
5645
# we fail silently using the `continue-on-error` option. It's
5746
# nice if this succeeds, but if it fails for any reason, it
5847
# does not mean that our lint-test checks failed.
5948
- name: Prepare Pull Request Payload artifact
6049
id: prepare-artifact
61-
if: always() && github.event_name == 'pull_request'
50+
if: github.event_name == 'pull_request'
6251
continue-on-error: true
6352
run: cat $GITHUB_EVENT_PATH | jq '.pull_request' > pull_request_payload.json
6453

@@ -67,7 +56,7 @@ jobs:
6756
# `continue-on-error` conclusion is applied, we use the
6857
# `.outcome` value. This step also fails silently.
6958
- name: Upload a Build Artifact
70-
if: always() && steps.prepare-artifact.outcome == 'success'
59+
if: steps.prepare-artifact.outcome == 'success'
7160
continue-on-error: true
7261
uses: actions/upload-artifact@v4
7362
with:

0 commit comments

Comments
 (0)