| 1 | name: Telemetry Ingest |
| 2 | |
| 3 | # The ingest Worker's guards are only worth anything if they run. Two of them |
| 4 | # are welds to files outside this directory — `docs/TELEMETRY.md` (the published |
| 5 | # schema) and `crates/telemetry/tests/golden/v1.json` (the client's pinned wire |
| 6 | # form) — so this workflow triggers on changes to those as well. A doc edit that |
| 7 | # the endpoint would reject fails here. |
| 8 | # |
| 9 | # There is deliberately NO deploy job. Publishing this Worker is the owner's |
| 10 | # action, run by hand, and `telemetry_endpoint` stays unset until he has |
| 11 | # deployed and verified. See telemetry-ingest/README.md. |
| 12 | |
| 13 | on: |
| 14 | push: |
| 15 | branches: [master, main] |
| 16 | paths: |
| 17 | - 'telemetry-ingest/**' |
| 18 | - 'docs/TELEMETRY.md' |
| 19 | - 'crates/telemetry/**' |
| 20 | - '.github/workflows/telemetry-ingest.yml' |
| 21 | pull_request: |
| 22 | branches: [master, main] |
| 23 | paths: |
| 24 | - 'telemetry-ingest/**' |
| 25 | - 'docs/TELEMETRY.md' |
| 26 | - 'crates/telemetry/**' |
| 27 | - '.github/workflows/telemetry-ingest.yml' |
| 28 | workflow_dispatch: |
| 29 | |
| 30 | permissions: |
| 31 | contents: read |
| 32 | |
| 33 | jobs: |
| 34 | check: |
| 35 | name: Schema weld, IP guard, and types |
| 36 | runs-on: ubuntu-latest |
| 37 | defaults: |
| 38 | run: |
| 39 | working-directory: telemetry-ingest |
| 40 | steps: |
| 41 | - uses: actions/checkout@v7 |
| 42 | - uses: actions/setup-node@v7 |
| 43 | with: |
| 44 | node-version: 22 |
| 45 | cache: 'npm' |
| 46 | cache-dependency-path: telemetry-ingest/package-lock.json |
| 47 | - name: Install dependencies |
| 48 | run: npm ci |
| 49 | - name: Run tests |
| 50 | run: npm test |
| 51 | - name: TypeScript type check |
| 52 | run: npm run typecheck |
| 53 | - name: Bundle check |
| 54 | # `--dry-run` builds the Worker and resolves its bindings without |
| 55 | # touching a Cloudflare account. It is the step that would have caught |
| 56 | # the entrypoint exporting a non-callable named export. |
| 57 | run: npm run check |
| 58 |