Skip to content

Commit 32e616e

Browse files
committed
add nightly e2e run
1 parent c086ae7 commit 32e616e

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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

0 commit comments

Comments
 (0)