Skip to content

docs(corpus): align CLI docs, genesis pins, JCS dialect, and expected shapes with shipped semantics (criterion 436) #964

docs(corpus): align CLI docs, genesis pins, JCS dialect, and expected shapes with shipped semantics (criterion 436)

docs(corpus): align CLI docs, genesis pins, JCS dialect, and expected shapes with shipped semantics (criterion 436) #964

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
changes:
runs-on: ubuntu-latest
outputs:
python: ${{ steps.filter.outputs.python }}
typescript: ${{ steps.filter.outputs.typescript }}
verifier: ${{ steps.filter.outputs.verifier }}
actions: ${{ steps.filter.outputs.actions }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
python:
- 'python/**'
- 'conformance/**'
# The shared case tables gate both verifiers, so editing one must run
# the jobs that consume it or the gate could be weakened unseen.
- 'verifier/cross-language-cases.json'
- 'verifier/axis-parity-cases.json'
- 'verifier/anchor-value-cases.json'
- '.github/workflows/ci.yml'
typescript:
- 'typescript/**'
- 'conformance/**'
# The TS verifier parity gate reads the shared conformance corpus,
# so a corpus change must re-run the TS job (not just the Python one).
- 'verifier/conformance-vectors/**'
- 'verifier/cross-language-cases.json'
- 'verifier/axis-parity-cases.json'
- 'verifier/anchor-value-cases.json'
- '.github/workflows/ci.yml'
verifier:
- 'python/src/asqav/verifier/**'
- 'verifier/conformance-vectors/**'
- 'verifier/cross-language-cases.json'
- 'verifier/axis-parity-cases.json'
- 'verifier/anchor-value-cases.json'
- '.github/workflows/ci.yml'
actions:
- 'github-action/**'
- 'github-action-risk-acceptance/**'
- '.github/workflows/ci.yml'
python:
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e "./python[all,dev]" pytest ruff
- run: ruff check python/src
- run: pytest python/tests -v --tb=short --continue-on-collection-errors
typescript:
needs: changes
if: needs.changes.outputs.typescript == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20', '22']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: typescript/package-lock.json
- run: npm ci
working-directory: typescript
- run: npm run lint --if-present
working-directory: typescript
- run: npm test
working-directory: typescript
# Run the release build in CI so a green run guarantees
# npm run build (dts included) compiles. Publish runs the same command.
- run: npm run build
working-directory: typescript
verifier:
needs: changes
if: needs.changes.outputs.verifier == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# dilithium-py is required, not optional: the ML-DSA-65 forgery and
# issuer-binding tests skip without it, so the job would prove nothing.
- run: pip install cryptography "dilithium-py==1.4.0" pytest "ruff==0.15.20"
- run: ruff check python/src/asqav/verifier
- run: PYTHONPATH=python/src pytest python/tests/test_oracle.py python/tests/test_verify_receipt.py python/tests/test_verify_receipt_revoked_key.py python/tests/test_verify_receipt_failclean.py python/tests/test_offline_verify.py python/tests/test_cross_language_cases.py python/tests/test_axis_parity_cases.py python/tests/test_anchor_value_cases.py python/tests/test_anchor_forged_value.py python/tests/test_oracle_kid_shared_resolution.py python/tests/test_signing_key_sibling.py python/tests/test_exit_artifact_cli.py -v --tb=short
actions:
needs: changes
if: needs.changes.outputs.actions == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
# Pinned: an unpinned ruff turns this job red on a linter release with no
# code change. ruff 0.16 flags 10 findings here that 0.15 does not.
- run: pip install pytest "ruff==0.15.20"
- run: ruff check github-action github-action-risk-acceptance
- run: pytest github-action github-action-risk-acceptance -v --tb=short
ci-ok:
# Single required status check for branch protection.
# Passes when matrix jobs succeeded OR were skipped (no relevant changes).
needs: [python, typescript, verifier, actions]
if: always()
runs-on: ubuntu-latest
steps:
- run: |
echo "python=${{ needs.python.result }}"
echo "typescript=${{ needs.typescript.result }}"
echo "verifier=${{ needs.verifier.result }}"
echo "actions=${{ needs.actions.result }}"
[[ "${{ needs.python.result }}" =~ ^(success|skipped)$ ]] || exit 1
[[ "${{ needs.typescript.result }}" =~ ^(success|skipped)$ ]] || exit 1
[[ "${{ needs.verifier.result }}" =~ ^(success|skipped)$ ]] || exit 1
[[ "${{ needs.actions.result }}" =~ ^(success|skipped)$ ]] || exit 1