@@ -75,16 +75,15 @@ workflows:
75
75
- run : npx nyc report --check-coverage true --lines 100 --include cypress/unit.js
76
76
77
77
- cypress/run :
78
- # TODO switch to separate example in "examples/..."
79
78
name : backend coverage
80
79
requires :
81
80
- cypress/install
82
-
83
81
# grab the workspace created by cypress/install job
84
82
attach-workspace : true
85
-
86
- start : npm run start:test:backend
87
- command : npx cypress run --config-file cypress-backend.json
83
+ working_directory : examples/backend
84
+ start : npm start
85
+ wait-on : ' http://localhost:3003'
86
+ command : ' ../../node_modules/.bin/cypress run'
88
87
89
88
# there are no jobs to follow this one
90
89
# so no need to save the workspace files (saves time)
@@ -94,12 +93,16 @@ workflows:
94
93
# you can click on it in the CircleCI UI
95
94
# to see live static HTML site
96
95
- store_artifacts :
97
- path : coverage
98
- # print code coverage summary to the terminal
99
- # and make sure there the coverage is above certain limit
100
- - run : npx nyc report --check-coverage true --lines 72
101
- # and look at the server index file - should be fully covered
102
- - run : npx nyc report --check-coverage true --lines 100 --include test-backend/index.js
96
+ path : examples/backend/coverage
97
+ - run :
98
+ command : npm run coverage:report
99
+ working_directory : examples/backend
100
+ - run :
101
+ name : Check code coverage 📈
102
+ command : |
103
+ node ../../scripts/check-coverage server.js
104
+ node ../../scripts/only-covered server.js
105
+ working_directory : examples/backend
103
106
104
107
- cypress/run :
105
108
attach-workspace : true
@@ -180,7 +183,6 @@ workflows:
180
183
- run :
181
184
command : npm run coverage:check
182
185
working_directory : examples/ts-example
183
-
184
186
- run :
185
187
name : Check code coverage 📈
186
188
command : |
0 commit comments