Skip to content

Commit 71e19c8

Browse files
committed
Improve error reporting on github
1 parent 1ba876c commit 71e19c8

File tree

1 file changed

+42
-8
lines changed

1 file changed

+42
-8
lines changed

.github/workflows/python-package.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,27 @@ on:
77
push:
88
branches: [ "master" ]
99
pull_request:
10-
branches: [ "master" ]
1110

1211
jobs:
1312
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.13"]
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- name: Install uv and set the Python version
23+
uses: astral-sh/setup-uv@v7
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Build package
28+
run: uv build
1429

30+
test:
1531
runs-on: ubuntu-latest
1632
strategy:
1733
fail-fast: false
@@ -30,14 +46,32 @@ jobs:
3046
run: uv sync --locked --all-extras --dev
3147

3248
- name: Lint with ruff
33-
run: |
34-
# stop the build if there are Python syntax errors or undefined names
35-
uv run ruff check --select=E9,F63,F7,F82 --output-format=github
36-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37-
uv run ruff check --exit-zero --output-format=github
49+
# stop the build if there are Python syntax errors or undefined names
50+
run: uv run ruff check --select=E9,F63,F7,F82 --output-format=github
3851

3952
- name: Test with pytest
4053
run: |
4154
uv run pytest
42-
- name: Build package
43-
run: uv build
55+
56+
lint:
57+
continue-on-error: true
58+
59+
runs-on: ubuntu-latest
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
python-version: ["3.13"]
64+
65+
steps:
66+
- uses: actions/checkout@v3
67+
68+
- name: Install uv and set the Python version
69+
uses: astral-sh/setup-uv@v7
70+
with:
71+
python-version: ${{ matrix.python-version }}
72+
73+
- name: Install dependencies
74+
run: uv sync --locked --all-extras --dev
75+
76+
- name: Lint with ruff
77+
run: uv run ruff check --output-format=github

0 commit comments

Comments
 (0)