Skip to content

Commit 88d190d

Browse files
fix(ci): ensure CRA app is fully up before running Cypress tests
1 parent b21e568 commit 88d190d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/integration.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ jobs:
5757
- name: Install examples
5858
run: npm run install:examples
5959

60-
- name: Start CRA app in background
60+
- name: Start servers
6161
run: |
62-
npm run start:cra > app.log 2>&1 &
63-
sleep 10
64-
echo "=== Dumping app.log ==="
65-
tail -n 50 app.log
62+
npm run start:api > api.log 2>&1 &
63+
npm run start:cra > cra.log 2>&1 &
6664
6765
- name: Wait for app to be reachable
6866
run: |
@@ -77,8 +75,7 @@ jobs:
7775
done
7876
7977
- name: Run integration test (CRA)
80-
run: |
81-
npx start-server-and-test start:api 3001 start:cra http-get://127.0.0.1:3000 "npm run cypress:run -- --browser chrome --headless"
78+
run: npm run cypress:run -- --browser chrome --headless
8279
env:
8380
CI: true
8481

0 commit comments

Comments
 (0)