Skip to content
This repository was archived by the owner on Aug 6, 2020. It is now read-only.

Commit bc2dbb5

Browse files
committed
Update CircleCI config
1 parent fbcf464 commit bc2dbb5

File tree

3 files changed

+8107
-6674
lines changed

3 files changed

+8107
-6674
lines changed

.circleci/config.yml

+47-49
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,57 @@
11
version: 2
22

33
defaults: &defaults
4-
working_directory: ~/repo
5-
docker:
6-
- image: circleci/node:9
4+
working_directory: ~/repo
5+
docker:
6+
- image: circleci/node:9
77

88
jobs:
9-
checkout_code:
10-
<<: *defaults
11-
steps:
12-
- checkout
13-
- save_cache:
14-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
15-
paths:
16-
- ~/repo
9+
checkout_code:
10+
<<: *defaults
11+
steps:
12+
- checkout
13+
- persist_to_workspace:
14+
root: ~/repo
15+
paths:
16+
- '*'
1717

18-
yarn_deps:
19-
<<: *defaults
20-
steps:
21-
- restore_cache:
22-
name: Restore code cache
23-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
24-
- restore_cache:
25-
name: Restore Yarn Package Cache
26-
key: yarn-cache-{{ checksum "yarn.lock" }}
27-
- run:
28-
name: Install Dependencies
29-
command: yarn install
30-
- save_cache:
31-
name: Save Yarn Package Cache
32-
key: yarn-cache-{{ checksum "yarn.lock" }}
33-
paths:
34-
- node_modules/
18+
npm_deps:
19+
<<: *defaults
20+
steps:
21+
- attach_workspace:
22+
at: ~/repo
23+
- restore_cache:
24+
keys:
25+
- node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
26+
- node-v1-{{ .Branch }}-
27+
- node-v1-
28+
- run: npm install
29+
- save_cache:
30+
key: node-v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
31+
paths:
32+
- node_modules/
33+
- persist_to_workspace:
34+
root: ~/repo
35+
paths:
36+
- 'node_modules/'
3537

36-
test:
37-
<<: *defaults
38-
steps:
39-
- restore_cache:
40-
name: Restore code cache
41-
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }}
42-
- restore_cache:
43-
name: Restore Yarn Package Cache
44-
key: yarn-cache-{{ checksum "yarn.lock" }}
45-
- run:
46-
name: Test
47-
command: yarn test
38+
test:
39+
<<: *defaults
40+
steps:
41+
- attach_workspace:
42+
at: ~/repo
43+
- run:
44+
name: Test
45+
command: npm test
4846

4947
workflows:
50-
version: 2
51-
test_only:
52-
jobs:
48+
version: 2
49+
test_only:
50+
jobs:
51+
- checkout_code
52+
- npm_deps:
53+
requires:
5354
- checkout_code
54-
- yarn_deps:
55-
requires:
56-
- checkout_code
57-
- test:
58-
requires:
59-
- yarn_deps
55+
- test:
56+
requires:
57+
- npm_deps

0 commit comments

Comments
 (0)