-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (67 loc) · 2.32 KB
/
ado-script.yml
File metadata and controls
81 lines (67 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ado-script Workspace
on:
pull_request:
paths:
- "scripts/ado-script/**"
- "src/compile/filter_ir.rs"
- "src/compile/extensions/ado_script.rs"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/ado-script.yml"
# Also run on pushes to main so any drift that slips through (e.g. a
# merge that bypassed PR CI, or a force-push) is caught loudly the
# moment it lands. If this fails on main, file a fix-drift issue and
# land a PR to regenerate `src/shared/types.gen.ts` and re-bundle —
# the workflow itself does not auto-PR.
push:
branches: [main]
paths:
- "scripts/ado-script/**"
- "src/compile/filter_ir.rs"
- "src/compile/extensions/ado_script.rs"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/ado-script.yml"
env:
CARGO_TERM_COLOR: always
jobs:
ado-script:
name: Build, Test & Drift-Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: scripts/ado-script/package-lock.json
- name: Install workspace dependencies
working-directory: scripts/ado-script
run: npm ci
- name: Regenerate types from Rust IR (codegen)
working-directory: scripts/ado-script
run: npm run codegen
- name: Verify generated TypeScript is up to date
run: |
if ! git diff --exit-code -- scripts/ado-script/src/shared/types.gen.ts; then
echo ""
echo "::error::types.gen.ts is out of date with the Rust IR."
echo "Run 'cd scripts/ado-script && npm run codegen' and commit the result."
exit 1
fi
- name: Run TypeScript tests
working-directory: scripts/ado-script
run: npm test
- name: Type-check
working-directory: scripts/ado-script
run: npm run typecheck
- name: Build bundles
working-directory: scripts/ado-script
run: npm run build
- name: Smoke-test bundles
working-directory: scripts/ado-script
run: npm run test:smoke
- name: E2E gate test
run: cargo test --test gate_e2e -- --ignored --nocapture