Skip to content

Commit 9560ab7

Browse files
committed
ci: use workflow to parallelize jobs
1 parent 362831d commit 9560ab7

File tree

1 file changed

+44
-17
lines changed

1 file changed

+44
-17
lines changed

.circleci/config.yml

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,64 @@
11
version: 2
2-
jobs:
3-
build:
4-
docker:
5-
- image: vuejs/ci
62

7-
working_directory: ~/repo
3+
defaults: &defaults
4+
docker:
5+
- image: vuejs/ci
6+
working_directory: ~/project/vue
87

8+
jobs:
9+
install:
10+
<<: *defaults
911
steps:
1012
- checkout
11-
1213
- restore_cache:
1314
keys:
1415
- v1-dependencies-{{ checksum "yarn.lock" }}
1516
- v1-dependencies-
16-
1717
- run:
1818
name: Install Dependencies
1919
command: yarn --frozen-lockfile
20-
2120
- save_cache:
2221
paths:
2322
- node_modules
2423
- ~/.cache/yarn
2524
key: v1-dependencies-{{ checksum "yarn.lock" }}
25+
- persist_to_workspace:
26+
root: ~/project
27+
paths:
28+
- vue
2629

27-
- run:
28-
name: Run Tests
29-
command: yarn test --ci --runInBand
30+
test:
31+
<<: *defaults
32+
steps:
33+
- attach_workspace:
34+
at: ~/project
35+
- run: yarn test --ci --runInBand
3036

31-
- run:
32-
name: Test d.ts
33-
command: yarn test-dts
37+
test-dts:
38+
<<: *defaults
39+
steps:
40+
- attach_workspace:
41+
at: ~/project
42+
- run: yarn test-dts
3443

35-
- run:
36-
name: Check size
37-
command: yarn size
44+
check-size:
45+
<<: *defaults
46+
steps:
47+
- attach_workspace:
48+
at: ~/project
49+
- run: yarn size
50+
51+
workflows:
52+
version: 2
53+
ci:
54+
jobs:
55+
- install
56+
- test:
57+
requires:
58+
- install
59+
- test-dts:
60+
requires:
61+
- install
62+
- check-size:
63+
requires:
64+
- install

0 commit comments

Comments
 (0)