ci: fetch the ADR citation check from .github instead of keeping a copy - #55
Merged
Merged
Conversation
This was referenced Sep 27, 2026
Merged
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Why
Pilot of "shared test fetched from main" as the way to stop copying this file. The decision to track `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.
Depends on
modern-python/.github PR "test: take the repo root from pytest so the ADR check can run from a fetched copy". Until it merges, `main` still has the `file`-based root and the fetched copy scans the temp dir instead of this repo. The `adr-check` step here is only meaningful after that lands.
Verified locally