68
68
non-rust : ${{ steps.changed-files-non-rust.outputs.any_modified }}
69
69
rust-lockfile : ${{ steps.changed-files-rust-lockfile.outputs.any_modified }}
70
70
71
+ percy-nonce :
72
+ name : Frontend / Percy Nonce
73
+ runs-on : ubuntu-latest
74
+ needs : changed-files
75
+ if : needs.changed-files.outputs.non-rust == 'true'
76
+
77
+ # persist job results to other jobs in the workflow
78
+ outputs :
79
+ nonce : ${{ steps.percy-nonce.outputs.nonce }}
80
+
81
+ steps :
82
+ # persist step results to other steps in the job
83
+ - id : percy-nonce
84
+ # adding a timestamp makes the nonce more unique for re-runs
85
+ run : echo "nonce=${{ github.run_id }}-$(date +%s)" >> $GITHUB_OUTPUT
86
+
71
87
backend-lint :
72
88
name : Backend / Lint
73
89
runs-on : ubuntu-22.04
@@ -177,7 +193,7 @@ jobs:
177
193
frontend-test :
178
194
name : Frontend / Test
179
195
runs-on : ubuntu-22.04
180
- needs : changed-files
196
+ needs : [ changed-files, percy-nonce]
181
197
if : needs.changed-files.outputs.non-rust == 'true'
182
198
183
199
env :
@@ -186,6 +202,8 @@ jobs:
186
202
# Percy secrets are included here to enable Percy's GitHub integration
187
203
# on community-submitted PRs
188
204
PERCY_TOKEN : web_0a783d8086b6f996809f3e751d032dd6d156782082bcd1423b9b860113c75054
205
+ PERCY_PARALLEL_NONCE : ${{ needs.percy-nonce.outputs.nonce }}
206
+ PERCY_PARALLEL_TOTAL : 2
189
207
190
208
steps :
191
209
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -202,15 +220,15 @@ jobs:
202
220
- run : pnpm install
203
221
204
222
- if : github.repository == 'rust-lang/crates.io'
205
- run : pnpm percy exec -- pnpm test-coverage
223
+ run : pnpm percy exec --parallel -- pnpm test-coverage
206
224
207
225
- if : github.repository != 'rust-lang/crates.io'
208
226
run : pnpm test-coverage
209
227
210
228
e2e-test :
211
229
name : Frontend / Test (playwright)
212
230
runs-on : ubuntu-22.04
213
- needs : changed-files
231
+ needs : [ changed-files, percy-nonce]
214
232
timeout-minutes : 60
215
233
if : needs.changed-files.outputs.non-rust == 'true'
216
234
@@ -220,6 +238,8 @@ jobs:
220
238
# Percy secrets are included here to enable Percy's GitHub integration
221
239
# on community-submitted PRs
222
240
PERCY_TOKEN : web_0a783d8086b6f996809f3e751d032dd6d156782082bcd1423b9b860113c75054
241
+ PERCY_PARALLEL_NONCE : ${{ needs.percy-nonce.outputs.nonce }}
242
+ PERCY_PARALLEL_TOTAL : 2
223
243
224
244
steps :
225
245
- uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -238,7 +258,7 @@ jobs:
238
258
- run : pnpm playwright install chromium
239
259
240
260
- if : github.repository == 'rust-lang/crates.io'
241
- run : pnpm percy exec -- pnpm e2e
261
+ run : pnpm percy exec --parallel -- pnpm e2e
242
262
243
263
- uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
244
264
if : ${{ !cancelled() }}
0 commit comments