-
-
Notifications
You must be signed in to change notification settings - Fork 21
258 lines (205 loc) Β· 6.63 KB
/
ci.yml
File metadata and controls
258 lines (205 loc) Β· 6.63 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
name: βοΈ CI
on:
# Run on all pull requests
pull_request: {}
# Run on pushes to the 'next' branch and to release branches
push:
branches: ['next', 'release/**']
# Cancel in-progress runs of this workflow.
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
YARN_ENABLE_HARDENED_MODE: 0
jobs:
detect-changes:
if: github.repository == 'cedarjs/cedar'
name: π Detect changes
runs-on: ubuntu-latest
outputs:
code: ${{ steps.detect-changes.outputs.code }}
rsc: ${{ steps.detect-changes.outputs.rsc }}
ssr: ${{ steps.detect-changes.outputs.ssr }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up job
uses: ./.github/actions/set-up-job
with:
set-up-yarn-cache: false
yarn-install-directory: ./.github/actions/detect-changes
build: false
- name: π Detect changes
id: detect-changes
uses: ./.github/actions/detect-changes
check:
needs: detect-changes
if: needs.detect-changes.outputs.code == 'true'
name: β
Check constraints, dependencies, and package.json's
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up job
uses: ./.github/actions/set-up-job
with:
set-up-yarn-cache: false
yarn-install-directory: .
build: false
- name: β
Check constraints, dependencies, and package.json's
run: yarn check
formatting-check:
name: π Check formatting (prettier)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up job
uses: ./.github/actions/set-up-job
with:
set-up-yarn-cache: false
yarn-install-directory: .
build: false
- name: π Check formatting (prettier)
run: yarn format:check
build-lint-test:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π Build, lint, test / ${{ matrix.os }} / node 24 latest
uses: ./.github/workflows/build-lint-test.yml
with:
os: ${{ matrix.os }}
tutorial-e2e:
needs: check
name: π² Tutorial E2E / node 24 latest
uses: ./.github/workflows/tutorial-e2e.yml
smoke-tests:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π Smoke tests / ${{ matrix.os }} / node 24 latest
uses: ./.github/workflows/smoke-tests-test.yml
with:
os: ${{ matrix.os }}
smoke-tests-react-18:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π Smoke tests React 18 / ${{ matrix.os }} / node 24 latest
uses: ./.github/workflows/smoke-tests-react-18-test.yml
with:
os: ${{ matrix.os }}
smoke-tests-esm:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π Smoke tests ESM / ${{ matrix.os }} / node 24 latest
uses: ./.github/workflows/smoke-tests-test-esm.yml
with:
os: ${{ matrix.os }}
cli-smoke-tests:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π CLI smoke tests / ${{ matrix.os }} / node 24 latest
uses: ./.github/workflows/cli-smoke-tests.yml
with:
os: ${{ matrix.os }}
telemetry-check:
needs: check
# When releasing a new version of Cedar this check would try to install
# @cedar/* package versions that aren't published yet, so it would always
# fail. That's why we skip it on release branches.
if: github.event_name == 'pull_request' || !startsWith(github.ref, 'refs/heads/release/')
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π Telemetry check / ${{ matrix.os }} / node 24 latest
uses: ./.github/workflows/telemetry-check.yml
with:
os: ${{ matrix.os }}
rsc-smoke-tests:
needs: [check, detect-changes]
if: needs.detect-changes.outputs.rsc == 'true'
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: ππ RSC Smoke tests / ${{ matrix.os }}
uses: ./.github/workflows/rsc-smoke-tests.yml
with:
os: ${{ matrix.os }}
ssr-smoke-tests:
needs: [check, detect-changes]
if: needs.detect-changes.outputs.ssr == 'true'
strategy:
matrix:
# TODO: add `windows-latest`.
os: [ubuntu-latest]
name: π SSR Smoke tests / ${{ matrix.os }}
uses: ./.github/workflows/ssr-smoke-tests.yml
with:
os: ${{ matrix.os }}
fragments-smoke-tests:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: π Fragments Smoke tests / ${{ matrix.os }}
uses: ./.github/workflows/fragments-smoke-tests.yml
with:
os: ${{ matrix.os }}
create-cedar-app:
needs: check
# When releasing a new version of Cedar this check would try to install
# @cedar/* package versions that aren't published yet, so it would always
# fail. That's why we skip it on release branches.
if: github.event_name == 'pull_request' || !startsWith(github.ref, 'refs/heads/release/')
name: π² Create Cedar App
uses: ./.github/workflows/create-cedar-app-test.yml
server-tests:
needs: check
name: Server tests
uses: ./.github/workflows/server-tests.yml
background-jobs-e2e:
needs: check
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: Background jobs E2E test / ${{ matrix.os }}
uses: ./.github/workflows/background-jobs-e2e.yml
with:
os: ${{ matrix.os }}
ci-status-check:
needs:
- check
- build-lint-test
- tutorial-e2e
- smoke-tests
- smoke-tests-react-18
- cli-smoke-tests
- telemetry-check
- rsc-smoke-tests
- ssr-smoke-tests
- fragments-smoke-tests
- create-cedar-app
- server-tests
- background-jobs-e2e
if: always()
name: β
CI Status Check
runs-on: ubuntu-latest
steps:
- name: Evaluate previous job status
run: |
if [[ ${{ contains(needs.*.result, 'failure') }} == "true" ]]; then
echo "β One or more required jobs have failed"
exit 1
else
echo "β
All required jobs have passed or been skipped"
exit 0
fi