.github/workflows/lint.yml runs the ruff steps inside the syntax-check job, and #69 put that job on a [3.10, 3.11, 3.12] matrix. So pip install ruff and ruff check . now execute three times on every pull request.
Linting is independent of the interpreter version — ruff.toml pins target-version = "py310" explicitly, so all three runs check identical rules against identical files and always reach the same verdict. Two of the three are pure cost, and they also make a lint failure show up as three red checks instead of one.
Byte-compiling genuinely does need the matrix: that is the part that can differ between versions, and it should stay where it is.
The change
Move the two ruff steps out of syntax-check into their own job that does not use a matrix. Something like:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install ruff
run: pip install "ruff==0.16.1"
- name: Lint with ruff
run: ruff check .
Keep the version pin. An unpinned linter turns an unrelated pull request red the day upstream adds a rule.
Acceptance criteria
ruff check . runs exactly once per pull request
- The
syntax-check matrix still byte-compiles on 3.10, 3.11 and 3.12
- All jobs green
One file, no Windows machine needed. Worth pairing with #74, which fixes the other problem in the same workflow.
.github/workflows/lint.ymlruns theruffsteps inside thesyntax-checkjob, and #69 put that job on a[3.10, 3.11, 3.12]matrix. Sopip install ruffandruff check .now execute three times on every pull request.Linting is independent of the interpreter version —
ruff.tomlpinstarget-version = "py310"explicitly, so all three runs check identical rules against identical files and always reach the same verdict. Two of the three are pure cost, and they also make a lint failure show up as three red checks instead of one.Byte-compiling genuinely does need the matrix: that is the part that can differ between versions, and it should stay where it is.
The change
Move the two ruff steps out of
syntax-checkinto their own job that does not use a matrix. Something like:Keep the version pin. An unpinned linter turns an unrelated pull request red the day upstream adds a rule.
Acceptance criteria
ruff check .runs exactly once per pull requestsyntax-checkmatrix still byte-compiles on 3.10, 3.11 and 3.12One file, no Windows machine needed. Worth pairing with #74, which fixes the other problem in the same workflow.