Drop master guidance #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: smoke | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: smoke-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| archaeology-smoke: | |
| name: archaeology CLI smoke | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Restore cargo cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: smoke-ci-stable | |
| - name: Start timer | |
| run: echo "JOB_STARTED_AT=$(date +%s)" >> "$GITHUB_ENV" | |
| - name: Run archaeology CLI over representative fixture corpus | |
| shell: bash | |
| run: | | |
| set +e | |
| mkdir -p artifacts | |
| cargo run --locked -- archaeology \ | |
| tests/fixtures/claims/mixed_source.jsonl \ | |
| --policy tests/fixtures/policies/legacy.decode.v0.json \ | |
| --output artifacts/canon.jsonl \ | |
| --escalations artifacts/escalations.jsonl \ | |
| --convergence artifacts/convergence.json \ | |
| 2> artifacts/stderr.txt | |
| exit_code=$? | |
| set -e | |
| echo "CLI_EXIT_CODE=${exit_code}" >> "$GITHUB_ENV" | |
| if [[ "${exit_code}" -ne 1 ]]; then | |
| echo "expected archaeology CLI exit code 1, got ${exit_code}" >&2 | |
| cat artifacts/stderr.txt >&2 | |
| exit 1 | |
| fi | |
| - name: Verify locked output surfaces | |
| shell: bash | |
| run: | | |
| diff -u tests/fixtures/expected/archaeology/mixed_source.canon.jsonl artifacts/canon.jsonl | |
| diff -u tests/fixtures/expected/archaeology/mixed_source.escalations.jsonl artifacts/escalations.jsonl | |
| diff -u tests/fixtures/expected/archaeology/mixed_source.convergence.json artifacts/convergence.json | |
| - name: Write metrics artifact | |
| if: always() | |
| shell: bash | |
| run: | | |
| ended_at=$(date +%s) | |
| started_at="${JOB_STARTED_AT:-$ended_at}" | |
| elapsed_seconds=$((ended_at - started_at)) | |
| canon_bytes=$(wc -c < artifacts/canon.jsonl | tr -d ' ') | |
| escalations_bytes=$(wc -c < artifacts/escalations.jsonl | tr -d ' ') | |
| convergence_bytes=$(wc -c < artifacts/convergence.json | tr -d ' ') | |
| stderr_bytes=$(wc -c < artifacts/stderr.txt | tr -d ' ') | |
| cat > artifacts/metrics.json <<EOF | |
| { | |
| "workflow": "smoke", | |
| "job": "archaeology-smoke", | |
| "exit_code": ${CLI_EXIT_CODE:-999}, | |
| "elapsed_seconds": ${elapsed_seconds}, | |
| "outputs": { | |
| "canon_bytes": ${canon_bytes}, | |
| "escalations_bytes": ${escalations_bytes}, | |
| "convergence_bytes": ${convergence_bytes}, | |
| "stderr_bytes": ${stderr_bytes} | |
| } | |
| } | |
| EOF | |
| { | |
| echo "### archaeology CLI smoke" | |
| echo | |
| echo "- Status: ${{ job.status }}" | |
| echo "- Exit code: ${CLI_EXIT_CODE:-999}" | |
| echo "- Elapsed: ${elapsed_seconds}s" | |
| echo "- Canon bytes: ${canon_bytes}" | |
| echo "- Escalation bytes: ${escalations_bytes}" | |
| echo "- Convergence bytes: ${convergence_bytes}" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload smoke artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: archaeology-smoke-artifacts | |
| path: artifacts/ | |
| if-no-files-found: error | |