File tree Expand file tree Collapse file tree 1 file changed +22
-33
lines changed
Expand file tree Collapse file tree 1 file changed +22
-33
lines changed Original file line number Diff line number Diff line change 1- version : 2
1+
2+ # https://circleci.com/docs/language-javascript
3+ # https://circleci.com/developer/orbs/orb/circleci/node
4+
5+ version : 2.1
6+ orbs :
7+ node : circleci/node@7.1.0
8+
29jobs :
3- build :
4- working_directory : ~/repo
5- docker :
6- - image : circleci/node:10
10+ build_and_test :
11+ executor : node/default
712 steps :
813 - checkout
9- - restore_cache :
10- key : dependency-cache-{{ checksum "package.json" }}
14+ - node/install-packages :
15+ pkg-manager : yarn
1116 - run :
12- name : install
13- command : yarn install
14- - save_cache :
15- key : dependency-cache-{{ checksum "package.json" }}
16- paths :
17- - ./node_modules
18- - run :
19- name : lint
20- command : yarn lint
21- - run :
22- name : test
2317 command : yarn test
24- - store_artifacts :
25- path : test-results.xml
26- prefix : tests
18+ - run :
19+ command : yarn build
2720 - store_test_results :
28- path : test-results.xml
29- - deploy :
30- name : Maybe Deploy
31- command : |
32- if [ "${CIRCLE_BRANCH}" == "master" ]; then
33- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
34- npm run 2npm
35- fi
21+ path : test-results
22+ - persist_to_workspace :
23+ root : ~/project
24+ paths :
25+ - .
26+
3627workflows :
37- version : 2
38- build :
28+ test_my_app :
3929 jobs :
40- - build :
41- context : org-global
30+ - build_and_test
You can’t perform that action at this time.
0 commit comments