Skip to content

Commit a5259d1

Browse files
committed
robustness tweaks
1 parent 0d9cbe1 commit a5259d1

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
schedule:
55
- cron: '0 0 * * *' # Run daily at midnight
66
workflow_dispatch: # Allow manual triggering
7+
push:
8+
paths:
9+
- '.github/workflows/e2e-tests.yml'
710

811
jobs:
912
e2e-tests:
@@ -29,16 +32,28 @@ jobs:
2932
- name: Install Cypress
3033
run: yarn cypress install
3134

32-
- name: Run E2E tests
35+
- name: Setup and wait for services
3336
run: |
3437
# Start the dev environment in background
3538
yarn dev &
36-
# Wait for the server to be ready
39+
# Wait for the webserver to be ready
3740
npx wait-on http://localhost:5173
41+
# Wait for the database to be ready
42+
npx wait-on http://localhost:5984
43+
# Wait for the backend to be ready
44+
npx wait-on http://localhost:3000
45+
46+
- name: Run E2E tests
47+
run: |
3848
# Run Cypress tests
3949
yarn cypress run
50+
51+
- name: Cleanup services
52+
if: always()
53+
run: |
4054
# Clean up
41-
kill $(lsof -t -i:5173)
55+
kill $(lsof -t -i:5173) || true
56+
kill $(lsof -t -i:3000) || true
4257
yarn couchdb:stop
4358
4459
- name: Upload screenshots on failure

0 commit comments

Comments
 (0)