Skip to content

Commit 5064581

Browse files
committed
ci: add cypress E2E workflow
1 parent 2d8ad29 commit 5064581

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run Cypress E2E Tests on PR
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
e2e:
14+
name: Run Cypress E2E Tests
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout Repository
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
cache: 'npm'
26+
27+
- name: Run Cypress E2E Tests
28+
uses: cypress-io/github-action@v6
29+
with:
30+
install-command: npm ci
31+
start: npm start
32+
wait-on: 'http://127.0.0.1:3000'
33+
wait-on-timeout: 120
34+
browser: chrome
35+
config: video=false
36+
37+
- name: Upload Cypress Screenshots on Failure
38+
if: failure()
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: cypress-screenshots
42+
path: cypress/screenshots
43+
if-no-files-found: ignore

0 commit comments

Comments
 (0)