-
Notifications
You must be signed in to change notification settings - Fork 1
199 lines (186 loc) · 5.3 KB
/
ci.yml
File metadata and controls
199 lines (186 loc) · 5.3 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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
NODE_VERSION: "22"
PNPM_VERSION: "9.15.4"
jobs:
repo-hygiene:
name: repo-hygiene
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Run repo hygiene
run: node scripts/ci/repo-hygiene.mjs
package-metadata:
name: package-metadata
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Run package metadata checks
run: node scripts/ci/package-metadata.mjs
affected-build-test:
name: affected-build-test (node ${{ matrix.node-version }})
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node-version: ["22", "24"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run affected build, typecheck, lint, and self-contained tests
run: node scripts/ci/run-root-script.mjs ci:affected
code-health:
name: code-health
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run code health checks
run: node scripts/ci/run-root-script.mjs ci:code-health
pack-dry-run:
name: pack-dry-run
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run package dry-runs through turbo
run: node scripts/ci/run-root-script.mjs ci:pack-dry-run
- name: Verify pack output shape
run: node scripts/ci/pack-dry-run.mjs
docs-contract:
name: docs-contract
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run docs contract
run: node scripts/ci/run-root-script.mjs ci:docs-contract
- name: Validate public smoke contract JSON when present
run: |
contract_path="tests/smoke/docs-contract/public-smoke-contract.json"
if [ -f "${contract_path}" ]; then
jq empty "${contract_path}"
else
echo "::notice::No public smoke contract yet; skipped JSON validation."
fi
public-integration-smoke:
name: public-integration-smoke
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
run: |
corepack enable
corepack prepare pnpm@${PNPM_VERSION} --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run public integration smoke
run: node scripts/ci/run-root-script.mjs ci:public-smoke
security-compliance:
name: security-compliance
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Run security compliance
run: node scripts/security/security-compliance.mjs