-
Notifications
You must be signed in to change notification settings - Fork 7
179 lines (152 loc) · 5.23 KB
/
Copy pathci.yml
File metadata and controls
179 lines (152 loc) · 5.23 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: CI
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
pull_request:
paths-ignore:
- '**.md'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
name: Verify Node ${{ matrix.node-version }}
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
node-version:
- 22
- 24
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Install tmux
run: |
sudo apt-get update
sudo apt-get install --yes tmux
tmux -V
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: npm ci
- name: Verify dependency signatures
run: npm audit signatures
- name: Verify
run: npm run verify
- name: Write verify receipt
run: |
mkdir -p .ci-receipts
node scripts/cua/write-release-receipt.mjs verify .ci-receipts/verify-node-${{ matrix.node-version }}.json ubuntu-22.04
- name: Upload verify receipt
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: verify-receipt-node-${{ matrix.node-version }}
path: .ci-receipts
if-no-files-found: error
include-hidden-files: true
retention-days: 14
bundle:
name: Canonical server bundle
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Set up Node.js 22
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build canonical server bundle
run: npm run server:bundle
- name: Write bundle receipt
run: |
mkdir -p .ci-receipts
node scripts/cua/write-release-receipt.mjs bundle .ci-receipts/bundle-node22.json ubuntu-22.04 release/server
rm -rf release/server
- name: Upload bundle receipt
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: bundle-receipt-node-22
path: .ci-receipts
if-no-files-found: error
include-hidden-files: true
retention-days: 14
fleet-release:
name: Fleet release evidence
# Release-grade browser/desktop QA requires a warm dedicated host; CI runners
# starve the fixture startup budgets with high variance. Run it manually (the
# owner's verified local cua:release flow remains the release gate) and keep
# automatic CI on the verify and bundle contracts.
if: github.event_name == 'workflow_dispatch'
needs: [verify, bundle]
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Install isolated graphical CI dependencies
run: |
sudo apt-get update
sudo apt-get install --yes tmux xvfb gnome-shell gnome-screenshot dbus-x11 at-spi2-core python3 python3-pip
- name: Install pinned Python browser driver
run: |
python3 -m pip install --disable-pip-version-check --no-cache-dir 'playwright==1.49.1'
python3 -c 'from playwright.sync_api import sync_playwright; print(sync_playwright.__module__)'
- name: Set up Node.js 24
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
cache: npm
- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: npm ci
- name: Download CI parity receipts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
pattern: '*-receipt-node-*'
path: .cua-release-evidence/ci
merge-multiple: true
- name: Fleet browser and full release QA
env:
CUA_EVIDENCE_DIR: ${{ github.workspace }}/.cua-release-evidence
run: npm run cua:release
- name: Upload fleet release evidence
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: fleet-release-evidence-node-24
path: .cua-release-evidence
if-no-files-found: error
include-hidden-files: true
retention-days: 14