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
811jobs :
912 e2e-tests :
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
0 commit comments