Skip to content

Commit f8fa264

Browse files
committed
CI: Add e2e test
1 parent 26c9e28 commit f8fa264

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,43 @@ jobs:
195195

196196
- if: github.repository != 'rust-lang/crates.io'
197197
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

0 commit comments

Comments
 (0)