UNPKG

2.1 kBYAMLView Raw
1# Javascript Node CircleCI 2.0 configuration file
2#
3# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4#
5version: 2
6jobs:
7 build:
8 docker:
9 # specify the version you desire here
10 - image: circleci/node:10
11
12 # Specify service dependencies here if necessary
13 # CircleCI maintains a library of pre-built images
14 # documented at https://circleci.com/docs/2.0/circleci-images/
15 # - image: circleci/mongo:3.4.4
16
17 working_directory: ~/repo
18
19 steps:
20 - checkout
21
22 # Download and cache dependencies
23 - restore_cache:
24 keys:
25 - v1-dependencies-{{ checksum "package.json" }}
26 # fallback to using the latest cache if no exact match is found
27 - v1-dependencies-
28
29 - run: npm install
30
31 - save_cache:
32 paths:
33 - node_modules
34 key: v1-dependencies-{{ checksum "package.json" }}
35
36 # run tests!
37 - run: npm run test-ci
38
39 - store_test_results:
40 path: junit
41 - store_artifacts:
42 path: junit
43
44 publish:
45 docker:
46 # specify the version you desire here
47 - image: circleci/node:10
48
49 # Specify service dependencies here if necessary
50 # CircleCI maintains a library of pre-built images
51 # documented at https://circleci.com/docs/2.0/circleci-images/
52 # - image: circleci/mongo:3.4.4
53
54 working_directory: ~/repo
55
56 steps:
57 - checkout
58
59 # Download and cache dependencies
60 - restore_cache:
61 keys:
62 - v1-dependencies-{{ checksum "package.json" }}
63 # fallback to using the latest cache if no exact match is found
64 - v1-dependencies-
65
66 - run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
67
68 - run: npm install
69
70 - save_cache:
71 paths:
72 - node_modules
73 key: v1-dependencies-{{ checksum "package.json" }}
74
75 - run:
76 name: Publish Release
77 command: npm run semantic-release
78
79workflows:
80 version: 2
81 build_test_deploy:
82 jobs:
83 - build