Skip to content

Commit 25abe23

Browse files
committed
add windows test job
1 parent 4018a09 commit 25abe23

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.circleci/config.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ orbs:
44
# https://github.com/cypress-io/circleci-orb
55
cypress: cypress-io/[email protected] # used to run e2e tests
66
node: circleci/[email protected] # used to publish new NPM version
7+
win: circleci/windows@2 # run a test job on Windows
78

89
jobs:
910
unit:
@@ -485,6 +486,42 @@ workflows:
485486
../../node_modules/.bin/only-covered main.js
486487
working_directory: examples/one-spec
487488

489+
- cypress/run:
490+
name: Windows test
491+
executor:
492+
# executor comes from the "windows" orb
493+
name: win/default
494+
shell: bash.exe
495+
no-workspace: true
496+
start: npm start --prefix examples/all-files
497+
wait-on: 'http://localhost:1234'
498+
command: npx cypress run --project examples/all-files
499+
# store screenshots and videos
500+
store_artifacts: true
501+
post-steps:
502+
- run: cat examples/all-files/.nyc_output/out.json
503+
- run: cat examples/all-files/coverage/coverage-final.json
504+
# store the created coverage report folder
505+
# you can click on it in the CircleCI UI
506+
# to see live static HTML site
507+
- store_artifacts:
508+
path: examples/all-files/coverage
509+
# make sure the examples captures 100% of code
510+
- run:
511+
command: npx nyc report --check-coverage true --lines 100
512+
working_directory: examples/all-files
513+
- run:
514+
name: Check code coverage 📈
515+
# we will check the final coverage report
516+
# to make sure it only has files we are interested in
517+
# because there are files covered at 0 in the report
518+
command: |
519+
../../node_modules/.bin/check-coverage main.js
520+
../../node_modules/.bin/check-coverage second.js
521+
../../node_modules/.bin/check-coverage not-covered.js
522+
../../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js second.js not-covered.js
523+
working_directory: examples/all-files
524+
488525
- publish:
489526
filters:
490527
branches:
@@ -507,3 +544,4 @@ workflows:
507544
- example-docker-paths
508545
- example-use-webpack
509546
- example-all-files
547+
- Windows test

0 commit comments

Comments
 (0)