Skip to content

ci: fetch the ADR citation check from .github instead of keeping a copy - #37

Merged
lesnik512 merged 3 commits into
mainfrom
shared-adr-check
Sep 27, 2026
Merged

lesnik512 merged 3 commits into
mainfrom
shared-adr-check

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Deletes tests/test_adr_citations.py (one of 25 byte-identical copies across the org) and adds a just adr-check recipe that fetches the file from modern-python/.github at main into a temp dir and runs it with pytest --rootdir=.. The lint job runs it once; it is not on the pytest matrix, since the check is interpreter-independent.

Same change as the pilot, modern-python/eof-fixer#55, which is merged and green on main.

Why

Tracking main rather than a pinned ref or a package is deliberate: one place to change the rule, no release step, no version bumps across 25 repos. The trade is that a change in .github takes effect everywhere at once, and a failing run cannot be reproduced against the file it saw unless the fetch is repeated while main is unchanged.

--rootdir=. makes the fetched file see this repo as the root without applying this repo's addopts (so the coverage gate does not fire on a one-file run). adr_check_source can be overridden to a file:// path to run a not-yet-merged version of the check.

The deleted copy is byte-identical to the file .github served before modern-python/.github#119, which changed only how the root is found. The rule this repo is checked against is unchanged.

Verified locally

just adr-check against .github main: 7 passed, rootdir this repo.

This repo

The lint job did not use just, so it gains extractions/setup-just@v4 to run the recipe; the rest of the job is unchanged. Verified with a plain venv holding only pytest, since psycopg2 does not build on the local machine; CI syncs the full groups as before.

@lesnik512
lesnik512 merged commit 30db4ae into main Sep 27, 2026
4 checks passed
@lesnik512
lesnik512 deleted the shared-adr-check branch September 27, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant