From 608017bcf4b12891744a610c2e8ce9e4a5b499a3 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Sun, 27 Sep 2026 23:33:21 +0300 Subject: [PATCH] ci: run the shared ADR citation check (CI9) --- .github/workflows/main.yml | 2 ++ justfile | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 646a073..5a3c6ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 - uses: astral-sh/setup-uv@v8.2.0 - run: uv python install 3.14 - run: uv python pin 3.14 @@ -25,6 +26,7 @@ jobs: uv run ruff format . --check uv run ruff check . --no-fix uv run ty check + - run: just adr-check pytest: runs-on: ubuntu-latest diff --git a/justfile b/justfile index a27f3c1..9086db1 100644 --- a/justfile +++ b/justfile @@ -27,3 +27,14 @@ lint: uv run ruff format . uv run ruff check . --fix uv run ty check + +adr_check_source := "https://raw.githubusercontent.com/modern-python/.github/main/tests/test_adr_citations.py" + +# Tracks main on purpose: the shared check is unpinned. +adr-check: + #!/usr/bin/env sh + set -eu + dir="$(mktemp -d .adr-check.XXXXXX)" + trap 'rm -rf "$dir"' EXIT + curl -fsSL "{{ adr_check_source }}" -o "$dir/test_adr_citations.py" + uv run --no-sync pytest --rootdir=. --noconftest -o addopts= "$dir/test_adr_citations.py"