-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (91 loc) · 2.84 KB
/
Copy pathdeploy.yml
File metadata and controls
100 lines (91 loc) · 2.84 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Deploy to GitHub Pages
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
# Cancel any in-progress run when a new tag pushes a deploy.
# The e2e job doesn't gate the deploy job, so cancelling its in-flight
# run is a clean trade — saves us from the queue-behind-stale-e2e
# blockage we hit on v0.1.0-arch.2 and v0.2.0-alpha.1.
cancel-in-progress: true
# Same parallel-qc structure as ci.yml plus a web-build job that produces the
# dist/ Pages bundle. e2e gates on the three qc jobs; deploy gates on qc + web-build.
# See ci-acceleration-design (in kernelCAD-private).
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: QC — lint
run: npm run qc:lint
build-and-checks:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: QC — typecheck + build:cli + cookbook + drift check
run: npm run qc:build
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
# cli-bundle and eval/* integration tests require the bundled CLI at
# dist/cli/index.js; rebuild here because build-and-checks runs on a
# separate runner. Shared build cache keeps this fast (~10-15s on hit).
- name: Build CLI bundle (required by integration tests)
run: npm run build:cli
- name: QC — vitest
run: npm run qc:test
web-build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: Build (vite production bundle)
run: npm run build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
e2e:
runs-on: ubuntu-latest
timeout-minutes: 30
needs: [lint, build-and-checks, test]
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-cad
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: E2E tests (Playwright)
run: npm run test:e2e
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report
retention-days: 7
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [lint, build-and-checks, test, web-build]
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4