Skip to content

Commit 09a8c87

Browse files
fix(router-host-2000): wait on all router ports before e2e to deflake CI
Also retry Next dev E2E steps to reduce flakiness
1 parent 3ab7052 commit 09a8c87

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

.ci-logs/e2e-next-dev.log

Whitespace-only changes.

.github/workflows/e2e-next-dev.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,30 @@ jobs:
4747
run: node tools/scripts/ci-is-affected.mjs --appName=3000-home
4848
- name: E2E Test for Next.js Dev - Home
4949
if: steps.check-ci.outcome == 'success'
50-
run: |
51-
killall node
52-
npx nx run 3000-home:test:e2e
50+
uses: nick-fields/retry@v3
51+
with:
52+
max_attempts: 2
53+
timeout_minutes: 15
54+
command: |
55+
killall node || true
56+
npx nx run 3000-home:test:e2e
5357
5458
- name: E2E Test for Next.js Dev - Shop
5559
if: steps.check-ci.outcome == 'success'
56-
run: |
57-
killall node
58-
npx nx run 3001-shop:test:e2e
60+
uses: nick-fields/retry@v3
61+
with:
62+
max_attempts: 2
63+
timeout_minutes: 15
64+
command: |
65+
killall node || true
66+
npx nx run 3001-shop:test:e2e
5967
6068
- name: E2E Test for Next.js Dev - Checkout
6169
if: steps.check-ci.outcome == 'success'
62-
run: |
63-
killall node
64-
npx nx run 3002-checkout:test:e2e
70+
uses: nick-fields/retry@v3
71+
with:
72+
max_attempts: 2
73+
timeout_minutes: 15
74+
command: |
75+
killall node || true
76+
npx nx run 3002-checkout:test:e2e

.github/workflows/e2e-router.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,9 @@ jobs:
4646

4747
- name: E2E Test for Runtime Demo
4848
if: steps.check-ci.outcome == 'success'
49-
run: npx kill-port --port 2000,2001,2002,2003,2004,2200,2100 && pnpm run app:router:dev & echo "done" && sleep 30 && npx nx run-many --target=test:e2e --projects=router-host-2000 --parallel=1 && lsof -ti tcp:2000,2001,2002,2003,2004,2200,2100 | xargs kill
49+
run: |
50+
npx kill-port --port 2000,2001,2002,2003,2004,2200,2100 && \
51+
pnpm run app:router:dev & \
52+
pnpm wait-on tcp:2000 tcp:2001 tcp:2002 tcp:2003 tcp:2004 tcp:2200 tcp:2100 && \
53+
npx nx run-many --target=test:e2e --projects=router-host-2000 --parallel=1 && \
54+
lsof -ti tcp:2000,2001,2002,2003,2004,2200,2100 | xargs -r kill

0 commit comments

Comments
 (0)