Skip to content

Commit 14ccb9b

Browse files
committed
ci: run pytest on pull requests, with rsvg-convert available
docs.yml becomes ci.yml with a second job. The gate it adds is not really "run the tests" — it is running the ones that have never run anywhere. Every PNG assertion in the suite is gated on rsvg-convert, which no environment we use has installed. That is 26 skips, all of them test_no_cream_on_transparent, the invariant that stops a mark shipping stray white ink on every dark surface; plus 5 tests that hard-fail without it and 6 conditional blocks in test_assets.py that quietly drop their PNG checks. So the test job installs librsvg2-bin and runs rsvg-convert --version, because an apt-get that silently no-ops would leave the job green with the whole census skipped. Verified by CI rather than locally: this machine has no rsvg-convert, so the 31 affected tests cannot run here.
1 parent 45dfc24 commit 14ccb9b

2 files changed

Lines changed: 34 additions & 16 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v6
11+
- name: Install uv
12+
uses: astral-sh/setup-uv@v7
13+
with:
14+
python-version: "3.11"
15+
- name: Build site
16+
run: uv run mkdocs build --strict
17+
18+
test:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
# librsvg2-bin supplies rsvg-convert. Without it every PNG assertion skips
23+
# itself, so the version check is what keeps the job from passing empty.
24+
- name: Install rsvg-convert
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y librsvg2-bin
28+
rsvg-convert --version
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
31+
with:
32+
python-version: "3.11"
33+
- name: Run tests
34+
run: uv run pytest

‎.github/workflows/docs.yml‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)