ci: fetch the ADR citation check from .github instead of keeping a copy - #37
Merged
Merged
Conversation
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 ajust adr-checkrecipe that fetches the file frommodern-python/.githubatmaininto a temp dir and runs it withpytest --rootdir=.. Thelintjob 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
mainrather 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.githubtakes effect everywhere at once, and a failing run cannot be reproduced against the file it saw unless the fetch is repeated whilemainis unchanged.--rootdir=.makes the fetched file see this repo as the root without applying this repo'saddopts(so the coverage gate does not fire on a one-file run).adr_check_sourcecan be overridden to afile://path to run a not-yet-merged version of the check.The deleted copy is byte-identical to the file
.githubserved 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-checkagainst.githubmain: 7 passed, rootdir this repo.This repo
The lint job did not use
just, so it gainsextractions/setup-just@v4to run the recipe; the rest of the job is unchanged. Verified with a plain venv holding only pytest, sincepsycopg2does not build on the local machine; CI syncs the full groups as before.