-
Notifications
You must be signed in to change notification settings - Fork 45
52 lines (44 loc) · 1.4 KB
/
e2e-testing.yml
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
name: End-to-end tests
on: [pull_request]
jobs:
cypress-run:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [22.13.1]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Cypress install
run: ./node_modules/cypress/bin/cypress install
- name: Cypress run
uses: cypress-io/github-action@v6
with:
install: false
start: pnpm dev
command: pnpm e2e
wait-on: 'http://localhost:5173'
project: ./apps/playground
# after the test run completes
# store videos and any screenshots
# NOTE: screenshots will be generated only if E2E test failed
# thus we store screenshots only on failures
# Alternative: create and commit an empty cypress/screenshots folder
# to always have something to upload
- name: Upload Cypress artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: ./apps/playground/cypress/screenshots