File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : E2E Tests
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * *' # Run daily at midnight
6+ workflow_dispatch : # Allow manual triggering
7+
8+ jobs :
9+ e2e-tests :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v3
14+ with :
15+ submodules : ' recursive' # Get submodule for couchdb snapshot
16+
17+ - name : Setup Node.js
18+ uses : actions/setup-node@v3
19+ with :
20+ node-version : ' 18'
21+ cache : ' yarn'
22+
23+ - name : Setup Docker
24+ uses : docker/setup-buildx-action@v2
25+
26+ - name : Install dependencies
27+ run : yarn install
28+
29+ - name : Install Cypress
30+ run : yarn cypress install
31+
32+ - name : Run E2E tests
33+ run : |
34+ # Start the dev environment in background
35+ yarn dev &
36+ # Wait for the server to be ready
37+ npx wait-on http://localhost:8080
38+ # Run Cypress tests
39+ yarn cypress run
40+ # Clean up
41+ kill $(lsof -t -i:8080)
42+ yarn couchdb:stop
43+
44+ - name : Upload screenshots on failure
45+ uses : actions/upload-artifact@v3
46+ if : failure()
47+ with :
48+ name : cypress-screenshots
49+ path : cypress/screenshots
50+
51+ - name : Upload videos
52+ uses : actions/upload-artifact@v3
53+ if : always()
54+ with :
55+ name : cypress-videos
56+ path : cypress/videos
You can’t perform that action at this time.
0 commit comments