forked from vuejs/vuepress
/
config.yml
123 lines (106 loc) 路 2.88 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2.1
defaults: &defaults
working_directory: ~/project
docker:
- image: circleci/node:latest
jobs:
#------------------------------------------------------------
# 1. Install dependencies
#------------------------------------------------------------
install-dependencies:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- v1-deps-{{ checksum "yarn.lock" }}
- v1-deps
- run:
name: 'Install dependencies'
command: yarn --frozen-lockfile --non-interactive
- save_cache:
key: v1-deps-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- persist_to_workspace:
root: ~/project
paths:
- node_modules
- packages/*/node_modules
- packages/@vuepress/*/node_modules
#------------------------------------------------------------
# 2. Run parallel jobs:
# => tsc
# => tests
# => linter
# => docs linter
#------------------------------------------------------------
run-tsc:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: 'Run tsc'
command: yarn tsc
- persist_to_workspace:
root: ~/project
paths:
- packages/@vuepress/shared-utils/lib
run-tests:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: 'Run tests'
command: yarn test
run-linter-check:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: 'Run linter'
command: yarn lint
run-docs-linter-check:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: 'Run md linter'
command: yarn workspace docs lint-md
#------------------------------------------------------------
# 3. Build VuePress
#------------------------------------------------------------
build:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- run:
name: 'Run tests'
command: yarn build
#------------------------------------------------------------
# Workflows
#------------------------------------------------------------
workflows:
version: 2
build:
jobs:
- install-dependencies
- run-linter-check: { requires: [install-dependencies] }
- run-docs-linter-check: { requires: [install-dependencies] }
- run-tsc: { requires: [install-dependencies] }
- run-tests: { requires: [run-tsc] }
- build: { requires: [run-tests, run-linter-check, run-docs-linter-check] }