Skip to content

ci: fetch the ADR check into the repo and run it without the repo's conftests or addopts - #56

Merged
lesnik512 merged 1 commit into
mainfrom
adr-check-v2
Sep 27, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
adr-check-v2

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

The adr-check recipe 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's pytest_collect_file calls path.relative_to(config.rootpath) and raises ValueError for 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.toml as the ini file and would apply the repo's addopts (coverage gates with --cov-fail-under) to a one-file run, and would load a root conftest.py if one exists. -o addopts= and --noconftest remove 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

  • Here: 9 passed against .github main, no temp dir left behind.
  • chat-app (the failing case): 9 passed with pytest-alembic installed; exit 1 with the file and citation named when a broken citation is planted; temp dir removed on both paths.

@lesnik512
lesnik512 merged commit 4a9fcad into main Sep 27, 2026
14 checks passed
@lesnik512
lesnik512 deleted the adr-check-v2 branch September 27, 2026 19:49
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