ci: fetch the ADR check into the repo and run it without the repo's conftests or addopts - #56
Merged
Merged
Conversation
…onftests or addopts
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
The
adr-checkrecipe now fetches the shared test into a temp dir inside the repo (.adr-check.XXXXXX, removed on exit) and runs it with--noconftest -o addopts=in addition to--rootdir=..Why
The pilot recipe (#55) put the file in
mktemp -d, outside the repo. That broke in chat-app:pytest-alembic'spytest_collect_filecallspath.relative_to(config.rootpath)and raisesValueErrorfor any path outside the root. Any plugin that assumes collected files live under rootpath has the same problem, so the fix is to keep the file inside the repo rather than to disable one plugin.Inside the repo, pytest finds
pyproject.tomlas the ini file and would apply the repo'saddopts(coverage gates with--cov-fail-under) to a one-file run, and would load a rootconftest.pyif one exists.-o addopts=and--noconftestremove both; the shared test needs neither. The temp dir is dot-prefixed so the scanner does not walk it.Same change is applied to the 23 open rollout PRs, so the recipe stays identical across repos.
Verified
.githubmain, no temp dir left behind.pytest-alembicinstalled; exit 1 with the file and citation named when a broken citation is planted; temp dir removed on both paths.