Skip to content

Commit 871fb9d

Browse files
committed
Lint in separate job
1 parent ec2e806 commit 871fb9d

1 file changed

Lines changed: 19 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,34 @@ name: CI
33
on:
44
push:
55
pull_request:
6+
schedule:
7+
# cron every week on Monday
8+
- cron: "0 0 * * 1"
69

710
jobs:
8-
build:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.11"
19+
- name: Set up ruff
20+
run: |
21+
pip install ruff
22+
# stop the build if there are Python syntax errors or undefined names
23+
ruff check --output-format=github --select=E9,F63,F7,F82 .
24+
# default set of ruff rules with GitHub Annotations
25+
ruff check --output-format=github .
926
27+
test:
1028
runs-on: ${{ matrix.os }}
1129
strategy:
1230
fail-fast: false
1331
matrix:
1432
os: [ubuntu-latest, macos-latest, windows-latest]
1533
python-version: ["3.10", "3.11", "3.12", "3.13"]
16-
1734
steps:
1835
- uses: actions/checkout@v4
1936
- name: Set up Python ${{ matrix.python-version }}
@@ -24,14 +41,6 @@ jobs:
2441
run: |
2542
python -m pip install --upgrade pip
2643
pip install -e .[test]
27-
- name: Lint with ruff
28-
run: |
29-
pip install ruff
30-
# stop the build if there are Python syntax errors or undefined names
31-
ruff check --output-format=github --select=E9,F63,F7,F82 .
32-
# default set of ruff rules with GitHub Annotations
33-
ruff check --output-format=github .
34-
continue-on-error: true
3544
- name: Test with pytest
3645
run: pytest tests --doctest-modules --junitxml=reports/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml --cov=com --cov-report=xml --cov-report=html
3746
- name: Upload test results

0 commit comments

Comments
 (0)