|
1 | 1 | # https://circleci.com/docs/2.0/configuration-reference/
|
2 | 2 | version: 2.1
|
3 | 3 | orbs:
|
4 |
| - cypress: cypress-io/cypress@1.17.1 # used to run e2e tests |
| 4 | + cypress: cypress-io/cypress@1.19.2 # used to run e2e tests |
5 | 5 | node: circleci/node@1.1.6 # used to publish new NPM version
|
6 | 6 |
|
7 | 7 | jobs:
|
@@ -255,6 +255,41 @@ workflows:
|
255 | 255 | ../../node_modules/.bin/only-covered main.ts calc.ts
|
256 | 256 | working_directory: examples/ts-example
|
257 | 257 |
|
| 258 | + - cypress/run: |
| 259 | + attach-workspace: true |
| 260 | + name: example-use-webpack |
| 261 | + requires: |
| 262 | + - cypress/install |
| 263 | + # there are no jobs to follow this one |
| 264 | + # so no need to save the workspace files (saves time) |
| 265 | + no-workspace: true |
| 266 | + working_directory: examples/use-webpack |
| 267 | + build: npm run build |
| 268 | + start: npm start |
| 269 | + wait-on: 'http://localhost:5000' |
| 270 | + command: '../../node_modules/.bin/cypress run' |
| 271 | + # wrong path when using working_directory |
| 272 | + # https://github.com/cypress-io/circleci-orb/issues/265 |
| 273 | + # store screenshots and videos |
| 274 | + # store_artifacts: true |
| 275 | + post-steps: |
| 276 | + - store_artifacts: |
| 277 | + path: examples/use-webpack/cypress/videos |
| 278 | + - store_artifacts: |
| 279 | + path: examples/use-webpack/cypress/screenshots |
| 280 | + # store the created coverage report folder |
| 281 | + # you can click on it in the CircleCI UI |
| 282 | + # to see live static HTML site |
| 283 | + - store_artifacts: |
| 284 | + path: examples/use-webpack/coverage |
| 285 | + - run: |
| 286 | + name: Check code coverage 📈 |
| 287 | + command: | |
| 288 | + ../../node_modules/.bin/check-coverage src/index.js |
| 289 | + ../../node_modules/.bin/check-coverage src/calc.js |
| 290 | + ../../node_modules/.bin/only-covered src/index.js src/calc.js |
| 291 | + working_directory: examples/use-webpack |
| 292 | + |
258 | 293 | - cypress/run:
|
259 | 294 | attach-workspace: true
|
260 | 295 | name: example-same-folder
|
@@ -428,3 +463,4 @@ workflows:
|
428 | 463 | - example-one-spec
|
429 | 464 | - example-exclude-files
|
430 | 465 | - example-docker-paths
|
| 466 | + - example-use-webpack |
0 commit comments