Skip to content

Expand example and parity coverage #118

Expand example and parity coverage

Expand example and parity coverage #118

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [master, main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
ZIG_VERSION: "0.15.2"
ZIG_URL: https://ziglang.org/download/0.15.2/zig-x86_64-linux-0.15.2.tar.xz
ZIG_SHA256: 02aa270f183da276e5b5920b1dac44a63f1a49e55050ebde3aecc9eb82f93239
jobs:
python:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.13"
- name: Install uv
run: python -m pip install uv
- name: Install Zig
run: |
curl -fsSL "$ZIG_URL" -o "$RUNNER_TEMP/zig.tar.xz"
echo "$ZIG_SHA256 $RUNNER_TEMP/zig.tar.xz" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/zig"
tar -xJf "$RUNNER_TEMP/zig.tar.xz" -C "$RUNNER_TEMP/zig" --strip-components=1
echo "$RUNNER_TEMP/zig" >> "$GITHUB_PATH"
"$RUNNER_TEMP/zig/zig" version
- name: Install dependencies
run: uv sync --locked --all-groups
- name: Run pytest
run: PYTHONPATH=. uv run pytest --tb=no -q
- name: Audit Python dependencies
run: uvx --from pip-audit==2.10.0 pip-audit --strict
- name: Static security scan
# B404/B603 are expected for trusted verifier scripts that run generated artifacts.
run: uvx --from bandit==1.9.4 bandit -r a7 scripts main.py -q --skip B404,B603
- name: Verify error stages
run: PYTHONPATH=. uv run python scripts/verify_error_stages.py --mode-set all --format both
- name: Verify examples through Zig
run: uv run python scripts/verify_examples_e2e.py
- name: Verify examples through C
run: uv run python scripts/verify_examples_e2e_c.py
- name: Verify backend parity
run: uv run python scripts/verify_backend_parity.py
- name: Build debug artifacts
run: uv run python scripts/build_examples.py --profile debug --backend both --clean
- name: Build release artifacts
run: uv run python scripts/build_examples.py --profile release --backend both --clean
- name: Build package
run: uv build
- name: Verify wheel install
run: uv run python scripts/verify_wheel_install.py --skip-build
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: "3.13"
- name: Install uv
run: python -m pip install uv
- name: Check docs writing style
run: uv run python scripts/check_docs_style.py
- name: Check for committed secrets
run: uv run python scripts/check_no_secrets.py
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
with:
node-version: "22"
cache: npm
cache-dependency-path: site/package-lock.json
- name: Install docs dependencies
working-directory: site
run: npm ci
- name: Audit docs runtime dependencies
working-directory: site
run: npm audit --omit=dev --audit-level=moderate
- name: Lint docs
working-directory: site
run: npm run lint -- --max-warnings=0
- name: Build docs
working-directory: site
run: npm run build