File tree Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Expand file tree Collapse file tree 3 files changed +44
-2
lines changed Original file line number Diff line number Diff line change 1+ # Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/
2+ version : 2 # use CircleCI 2.0
3+ jobs : # a collection of steps
4+ build : # runs not using Workflows must have a `build` job as entry point
5+ docker : # run the steps with Docker
6+ - image : circleci/node:lts # ...with this image as the primary container; this is where all `steps` will run
7+ steps :
8+ - checkout
9+ - run :
10+ name : update-npm
11+ command : ' sudo npm install -g npm@latest'
12+ - run :
13+ name : Check current version of node
14+ command : node -v
15+ - run :
16+ name : Check current version of NPM
17+ command : npm -v
18+
19+ - restore_cache : # special step to restore the dependency cache
20+ # Read about caching dependencies: https://circleci.com/docs/2.0/caching/
21+ key : dependency-cache-{{ checksum "package.json" }}
22+ - run :
23+ name : install-npm-wee
24+ command : npm install
25+ - save_cache : # special step to save the dependency cache
26+ key : dependency-cache-{{ checksum "package.json" }}
27+ paths :
28+ - ./node_modules
29+
30+ - run : # run tests
31+ name : test
32+ command : npm run ci
33+
34+ - store_artifacts : # special step to save test results as as artifact
35+ # Upload test summary for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
36+ path : test-results.xml
37+ prefix : tests
38+ - store_artifacts : # for display in Artifacts: https://circleci.com/docs/2.0/artifacts/
39+ path : coverage
40+ prefix : coverage
41+ - store_test_results : # for display in Test Summary: https://circleci.com/docs/2.0/collect-test-data/
42+ path : test-results.xml
Original file line number Diff line number Diff line change 1717 "watch" : " jest src/ --watch --coverage" ,
1818 "coverage" : " jest src/ --coverage && open coverage/lcov-report/index.html" ,
1919 "lint" : " npx eslint --fix --format codeframe src/" ,
20- "ci" : " npx eslint src/ && npm test "
20+ "ci" : " npx eslint src/ && jest src/ --coverage "
2121 },
2222 "keywords" : [
2323 " algorithms" ,
You can’t perform that action at this time.
0 commit comments