Skip to content

Commit 1943777

Browse files
authored
ci: fetch the ADR citation check from .github instead of keeping a copy (#144)
* ci: fetch the ADR citation check from .github instead of keeping a copy * ci: fetch the ADR check into the repo and run it without the repo's conftests or addopts
1 parent d97ea96 commit 1943777

3 files changed

Lines changed: 12 additions & 111 deletions

File tree

‎.github/workflows/_checks.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- run: uv python install 3.11
1616
- run: uv python pin 3.11
1717
- run: just install lint-ci
18+
- run: just adr-check
1819

1920
docs:
2021
runs-on: ubuntu-latest

‎justfile‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ lint-ci:
1616
uv run ruff check --no-fix
1717
uv run ty check
1818

19+
adr_check_source := "https://raw.githubusercontent.com/modern-python/.github/main/tests/test_adr_citations.py"
20+
21+
# Tracks main on purpose: the shared check is unpinned.
22+
adr-check:
23+
#!/usr/bin/env sh
24+
set -eu
25+
dir="$(mktemp -d .adr-check.XXXXXX)"
26+
trap 'rm -rf "$dir"' EXIT
27+
curl -fsSL "{{ adr_check_source }}" -o "$dir/test_adr_citations.py"
28+
uv run --no-sync pytest --rootdir=. --noconftest -o addopts= "$dir/test_adr_citations.py"
29+
1930
test *args:
2031
uv run --no-sync pytest {{ args }}
2132

‎tests/test_adr_citations.py‎

Lines changed: 0 additions & 111 deletions
This file was deleted.

0 commit comments

Comments
 (0)