Skip to content

Commit 5bfed42

Browse files
committed
Update cypress-test.yml
1 parent fdf2538 commit 5bfed42

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

.github/workflows/cypress-test.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,32 @@ jobs:
2424
- name: Run Frontend Emulator
2525
run: yarn dev & echo $! > frontend_pid.txt
2626

27-
- name: Wait for Frontend to start
27+
- name: Run Emulator
28+
run: yarn emulator & echo $! > emulator_pid.txt
29+
30+
- name: Seed Database
31+
run: yarn seed
32+
33+
- name: Check if Frontend is running
2834
run: |
2935
timeout=160
3036
while ! curl -s http://localhost:3000 > /dev/null; do
3137
echo "Waiting for frontend to start..."
3238
sleep 5
3339
timeout=$((timeout - 5))
3440
if [ $timeout -le 0 ]; then
35-
echo "Frontend did not start in time"
36-
exit 1
41+
echo "Frontend did not start in time, proceeding to next step."
42+
break
3743
fi
3844
done
3945
40-
- name: Run Emulator
41-
run: yarn emulator & echo $! > emulator_pid.txt
42-
43-
- name: Seed Database
44-
run: yarn seed
45-
46-
- name: Check if Frontend is running
47-
run: curl -f http://localhost:3000/ || exit 1
48-
4946
- name: Run Cypress Tests
5047
run: yarn test:cypress
5148

5249
- name: Stop Emulator
53-
run: kill $(cat emulator_pid.txt)
50+
run: kill $(cat emulator_pid.txt) || true
5451
if: always()
5552

5653
- name: Stop Frontend Server
57-
run: kill $(cat frontend_pid.txt)
54+
run: kill $(cat frontend_pid.txt) || true
5855
if: always()

cypress.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ module.exports = defineConfig({
99
},
1010
},
1111
e2e: {
12+
browser: 'chrome',
1213
setupNodeEvents(on, config) {
1314
// implement node event listeners here
1415
},

0 commit comments

Comments
 (0)