返回 CodeWhale
telemetry-ingest.yml
根目录 / .github / workflows / telemetry-ingest.yml
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 timeout-minutes: 15
38 defaults:
39 run:
40 working-directory: telemetry-ingest
41 steps:
42 - uses: actions/checkout@v7
43 - uses: actions/setup-node@v7
44 with:
45 node-version: 22
46 cache: 'npm'
47 cache-dependency-path: telemetry-ingest/package-lock.json
48 - name: Install dependencies
49 run: npm ci
50 - name: Run tests
51 run: npm test
52 - name: TypeScript type check
53 run: npm run typecheck
54 - name: Bundle check
55 # `--dry-run` builds the Worker and resolves its bindings without
56 # touching a Cloudflare account. It is the step that would have caught
57 # the entrypoint exporting a non-callable named export.
58 run: npm run check
59
59 lines YAML