Skip to content

Commit e6f159f

Browse files
committed
update yml
1 parent 57464a8 commit e6f159f

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/cypress-test.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Cypress Tests
22

33
on:
4-
push:
4+
push:
55
pull_request:
6-
workflow_dispatch:
6+
workflow_dispatch:
77

88
jobs:
99
test:
@@ -12,24 +12,30 @@ jobs:
1212
steps:
1313
- name: Checkout Repository
1414
uses: actions/checkout@v2
15-
15+
1616
- name: Set up Node.js
1717
uses: actions/setup-node@v2
1818
with:
1919
node-version: 18
2020

2121
- name: Install Frontend Dependencies
2222
run: yarn install
23-
23+
2424
- name: Run Frontend Emulator
2525
run: yarn dev & echo $! > frontend_pid.txt
2626

27+
- name: Wait for Frontend to start
28+
run: sleep 10
29+
2730
- name: Run Emulator
28-
run: yarn emulator & echo $! > emulator_pid.txt
31+
run: yarn emulator & echo $! > emulator_pid.txt
2932

3033
- name: Seed Database
3134
run: yarn seed
3235

36+
- name: Check if Frontend is running
37+
run: curl -f http://localhost:3000/ || exit 1
38+
3339
- name: Run Cypress Tests
3440
run: yarn test:cypress
3541

@@ -40,5 +46,3 @@ jobs:
4046
- name: Stop Frontend Server
4147
run: kill $(cat frontend_pid.txt)
4248
if: always()
43-
44-

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint": "eslint .",
1111
"lint:fix": "eslint . --fix",
1212
"emulator:cypress": "cypress open",
13-
"test:cypress": "cypress run"
13+
"test:cypress": "cypress run --browser chrome"
1414
},
1515
"dependencies": {
1616
"@babel/plugin-transform-runtime": "^7.18.2",

0 commit comments

Comments
 (0)