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