Skip to content

Commit ef4b445

Browse files
committed
ci(cypress): add wait-on and increase timeout
Increase wait-on timeout to 60s in Cypress GitHub Actions workflow to prevent flaky failures when the server takes longer to start. Add wait-on as a dev dependency for local and CI usage.
1 parent 2df8a75 commit ef4b445

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/cypress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Start server
1919
run: npm install -g http-server && http-server . -p 8000 &
2020
- name: Wait for server
21-
run: npx wait-on http://localhost:8000
21+
run: npx wait-on http://localhost:8000 --timeout 60s
2222
- uses: cypress-io/github-action@v4
2323
with:
2424
config-file: cypress.config.js

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"license": "ISC",
1818
"type": "commonjs",
1919
"devDependencies": {
20-
"cypress": "^15.3.0"
20+
"cypress": "^15.3.0",
21+
"wait-on": "^7.0.0"
2122
}
2223
}

0 commit comments

Comments
 (0)