Skip to content

Commit bdf032d

Browse files
committed
ci: run the shared ADR citation check (CI9)
1 parent 6ae4bc8 commit bdf032d

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v6
20+
- uses: extractions/setup-just@v4
2021
- uses: astral-sh/setup-uv@v8.2.0
2122
- run: uv python install 3.14
2223
- run: uv python pin 3.14
@@ -25,6 +26,7 @@ jobs:
2526
uv run ruff format . --check
2627
uv run ruff check . --no-fix
2728
uv run ty check
29+
- run: just adr-check
2830

2931
pytest:
3032
runs-on: ubuntu-latest

‎justfile‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,14 @@ lint:
2727
uv run ruff format .
2828
uv run ruff check . --fix
2929
uv run ty check
30+
31+
adr_check_source := "https://raw.githubusercontent.com/modern-python/.github/main/tests/test_adr_citations.py"
32+
33+
# Tracks main on purpose: the shared check is unpinned.
34+
adr-check:
35+
#!/usr/bin/env sh
36+
set -eu
37+
dir="$(mktemp -d .adr-check.XXXXXX)"
38+
trap 'rm -rf "$dir"' EXIT
39+
curl -fsSL "{{ adr_check_source }}" -o "$dir/test_adr_citations.py"
40+
uv run --no-sync pytest --rootdir=. --noconftest -o addopts= "$dir/test_adr_citations.py"

0 commit comments

Comments
 (0)