name: Distribution contract on: pull_request: paths: - ".github/workflows/distribution.yml" - "distribution/**" - "docs/next/website/**" - "docs/preview/**" - "docs/versions/**" - "scripts/agent_detection_manifest_check.py" - "scripts/config_reference_check.py" - "scripts/docs/**" - "scripts/docs_translation_parity.py" - "scripts/preview.py" - "scripts/test_agent_detection_manifest_check.py" - "scripts/test_config_reference_check.py" - "scripts/test_docs_translation_parity.py" - "scripts/test_preview.py" - "src/detect/manifest_update.rs" - "src/detect/manifests/**" push: branches: [master] paths: - ".github/workflows/distribution.yml" - "distribution/**" - "docs/next/website/**" - "docs/preview/**" - "docs/versions/**" - "scripts/agent_detection_manifest_check.py" - "scripts/config_reference_check.py" - "scripts/docs/**" - "scripts/docs_translation_parity.py" - "scripts/preview.py" - "scripts/test_agent_detection_manifest_check.py" - "scripts/test_config_reference_check.py" - "scripts/test_docs_translation_parity.py" - "scripts/test_preview.py" - "src/detect/manifest_update.rs" - "src/detect/manifests/**" permissions: contents: read concurrency: group: distribution-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: validate: runs-on: ubuntu-latest timeout-minutes: 10 steps: - name: Checkout uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 with: fetch-depth: 0 persist-credentials: false - name: Install Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: bun-version: 1.3.14 - name: Test documentation lifecycle run: bun test scripts/docs/*.test.ts - name: Validate published contract run: | python3 scripts/agent_detection_manifest_check.py --require-published python3 scripts/config_reference_check.py python3 scripts/docs_translation_parity.py --docs-root docs/next/website/src/content/docs node scripts/docs/versions.mjs check node scripts/docs/preview.mjs check - name: Test contract tooling run: | python3 -m unittest \ scripts.test_agent_detection_manifest_check \ scripts.test_config_reference_check \ scripts.test_docs_translation_parity \ scripts.test_preview