File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11name : Cypress Tests
22
33on :
4- push :
4+ push :
55 pull_request :
6- workflow_dispatch :
6+ workflow_dispatch :
77
88jobs :
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
4046 - name : Stop Frontend Server
4147 run : kill $(cat frontend_pid.txt)
4248 if : always()
43-
44-
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments