File tree Expand file tree Collapse file tree 2 files changed +45
-2
lines changed Expand file tree Collapse file tree 2 files changed +45
-2
lines changed Original file line number Diff line number Diff line change @@ -195,3 +195,43 @@ jobs:
195
195
196
196
- if : github.repository != 'rust-lang/crates.io'
197
197
run : pnpm test-coverage
198
+
199
+ e2e-test :
200
+ name : Frontend / Test (playwright)
201
+ runs-on : ubuntu-22.04
202
+ needs : changed-files
203
+ timeout-minutes : 60
204
+ if : needs.changed-files.outputs.non-rust == 'true'
205
+
206
+ env :
207
+ JOBS : 1 # See https://git.io/vdao3 for details.
208
+
209
+ # Percy secrets are included here to enable Percy's GitHub integration
210
+ # on community-submitted PRs
211
+ PERCY_TOKEN : web_0a783d8086b6f996809f3e751d032dd6d156782082bcd1423b9b860113c75054
212
+
213
+ steps :
214
+ - uses : actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
215
+
216
+ - uses : pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
217
+ with :
218
+ version : ${{ env.PNPM_VERSION }}
219
+
220
+ - uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
221
+ with :
222
+ cache : pnpm
223
+ node-version-file : package.json
224
+
225
+ - run : pnpm install
226
+
227
+ - run : pnpm playwright install chromium
228
+
229
+ - if : github.repository == 'rust-lang/crates.io'
230
+ run : pnpm percy exec -- pnpm e2e
231
+
232
+ - uses : actions/upload-artifact@v4
233
+ if : ${{ !cancelled() }}
234
+ with :
235
+ name : playwright-report
236
+ path : playwright-report/
237
+ retention-days : 14
Original file line number Diff line number Diff line change @@ -18,9 +18,11 @@ export default defineConfig({
18
18
/* Retry on CI only */
19
19
retries : process . env . CI ? 2 : 0 ,
20
20
/* Opt out of parallel tests on CI. */
21
- workers : process . env . CI ? 2 : undefined ,
21
+ workers : process . env . CI ? 1 : undefined ,
22
22
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
23
- reporter : process . env . CI ? 'dot' : [ [ 'html' , { open : 'never' } ] ] ,
23
+ reporter : process . env . CI
24
+ ? [ [ 'github' ] , [ 'html' , { outputFolder : 'playwright-report' } ] ]
25
+ : [ [ 'html' , { open : 'never' } ] ] ,
24
26
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
25
27
use : {
26
28
/* Base URL to use in actions like `await page.goto('/')`. */
@@ -73,5 +75,6 @@ export default defineConfig({
73
75
command : 'pnpm start' ,
74
76
url : 'http://127.0.0.1:4200' ,
75
77
reuseExistingServer : ! process . env . CI ,
78
+ timeout : 5 * 60 * 1000 ,
76
79
} ,
77
80
} ) ;
You can’t perform that action at this time.
0 commit comments