Skip to content

Commit a720262

Browse files
authored
[CI:e2e] robustness tweaks (#621)
2 parents 939b363 + 9f3c27a commit a720262

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 25 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:
@@ -14,6 +17,13 @@ jobs:
1417
with:
1518
submodules: 'recursive' # Get submodule for couchdb snapshot
1619

20+
- name: Display submodule information
21+
run: |
22+
echo "Submodule information:"
23+
git submodule status
24+
echo "CouchDB snapshot details:"
25+
cd test-couch && git log -1 --pretty=format:'%h - %s (%cr) <%an>'
26+
1727
- name: Setup Node.js
1828
uses: actions/setup-node@v3
1929
with:
@@ -29,16 +39,28 @@ jobs:
2939
- name: Install Cypress
3040
run: yarn cypress install
3141
32-
- name: Run E2E tests
42+
- name: Setup and wait for services
3343
run: |
3444
# Start the dev environment in background
3545
yarn dev &
36-
# Wait for the server to be ready
46+
# Wait for the webserver to be ready
3747
npx wait-on http://localhost:5173
48+
# Wait for the database to be ready
49+
npx wait-on http://localhost:5984
50+
# Wait for the backend to be ready
51+
npx wait-on http://localhost:3000
52+
53+
- name: Run E2E tests
54+
run: |
3855
# Run Cypress tests
3956
yarn cypress run
57+
58+
- name: Cleanup services
59+
if: always()
60+
run: |
4061
# Clean up
41-
kill $(lsof -t -i:5173)
62+
kill $(lsof -t -i:5173) || true
63+
kill $(lsof -t -i:3000) || true
4264
yarn couchdb:stop
4365
4466
- name: Upload screenshots on failure

test-couch

0 commit comments

Comments
 (0)