Skip to content

Commit 54992c9

Browse files
committed
ci: fetch the ADR citation check from .github instead of keeping a copy
1 parent d97ea96 commit 54992c9

3 files changed

Lines changed: 11 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ 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+
file="$(mktemp -d)/test_adr_citations.py"
26+
curl -fsSL "{{ adr_check_source }}" -o "$file"
27+
uv run --no-sync pytest --rootdir=. "$file"
28+
1929
test *args:
2030
uv run --no-sync pytest {{ args }}
2131

‎tests/test_adr_citations.py‎

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

0 commit comments

Comments
 (0)