Skip to content

Commit 25752fd

Browse files
committed
chore: run e2e on all prs, check service status before running
1 parent c0186ad commit 25752fd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ on:
1414
jobs:
1515
e2e:
1616
runs-on: ubuntu-latest
17-
# Only run on workflow_dispatch (manual trigger), but always register check on PRs
18-
if: github.event_name == 'workflow_dispatch' || github.ref_name == 'main'
1917

2018
steps:
2119
- name: Checkout code
@@ -47,8 +45,11 @@ jobs:
4745

4846
- name: Wait for services to be ready
4947
run: |
50-
timeout 60 bash -c 'until docker compose ps | grep -q "Up"; do sleep 2; done'
51-
sleep 10
48+
timeout 60 bash -c '
49+
while [ "$(docker compose ps | grep -c "Up")" -ne 3 ]; do
50+
sleep 2
51+
done
52+
' || { echo "Service readiness check failed:"; docker compose ps; exit 1; }
5253
5354
- name: Run E2E tests
5455
run: npm run test:e2e

0 commit comments

Comments
 (0)