Skip to content

Commit 909c99b

Browse files
RobLe3claude
andcommitted
ci: add fast_mode dispatch option to publish.yml
fast_mode=true skips full Python version matrix and conformance marks — intended for patch/doc-only releases after UX friction testing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a473b0f commit 909c99b

1 file changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,51 @@ on:
88
version:
99
description: "Version to publish (must match pyproject.toml)"
1010
required: true
11+
fast_mode:
12+
description: "Skip full test matrix — single Python version, no security audit (patch/doc-only releases)"
13+
required: false
14+
default: "false"
15+
type: choice
16+
options: ["false", "true"]
1117

1218
jobs:
1319
test:
1420
name: Tests (pre-publish gate)
1521
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
python-version: ${{ fromJson(inputs.fast_mode == 'true' && '["3.12"]' || '["3.11", "3.12"]') }}
1625
steps:
1726
- uses: actions/checkout@v4
1827
- uses: actions/setup-python@v5
1928
with:
20-
python-version: "3.12"
29+
python-version: ${{ matrix.python-version }}
2130
cache: pip
2231
cache-dependency-path: pyproject.toml
2332
- run: pip install -e ".[dev]" --quiet
2433
- run: python -m ruff check src tests
2534
- run: pytest tests/ -q
2635

36+
conformance:
37+
name: Conformance Mark Coverage
38+
if: inputs.fast_mode != 'true'
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- name: Verify conformance marks
43+
run: |
44+
FAIL=0
45+
for f in tests/test_*.py; do
46+
if ! grep -q "SDK-0[1-9]\|SDK-1[0-9]\|ADR-016" "$f"; then
47+
echo "MISSING conformance mark: $f"
48+
FAIL=1
49+
fi
50+
done
51+
exit $FAIL
52+
2753
publish:
2854
name: Build and publish to PyPI
29-
needs: test
55+
needs: [test]
3056
runs-on: ubuntu-latest
3157
environment: pypi
3258
permissions:

0 commit comments

Comments
 (0)