forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
221 lines (204 loc) · 6.19 KB
/
config.yml
File metadata and controls
221 lines (204 loc) · 6.19 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
version: 2
# Settings common to each job.
anchor_1: &defaults
working_directory: ~/angular-cli
docker:
- image: angular/ngcontainer
# Restore cache based on package-lock.json checksum for branch.
anchor_2: &restore_cache_defaults
key: angular-cli-{{ checksum "package-lock.json" }}
# Attach workspace that contains:
# - dist/ : built cli
# - angular-cli-e2e-default/ : initialized e2e test project
anchor_3: &attach_workspace_defaults
at: /workspace
jobs:
build:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- run: node --version
- run: npm --version
- run: npm install --quiet
- run: npm run build
- save_cache:
key: angular-cli-{{ checksum "package-lock.json" }}
paths:
- "node_modules"
lint:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- run: npm run lint
test:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- run: npm run test
# E2E test for current Angular.
e2e-setup:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- run: mkdir /workspace
- run: mkdir /workspace/angular-cli-e2e-default
# Ignore all tests, we just want the setup step to persist it to the workspace.
- run: node tests/run_e2e.js --tmpdir=/workspace/angular-cli-e2e-default --ignore=**/*
- run: mv dist /workspace/
- persist_to_workspace:
root: /workspace
paths:
- dist/
- angular-cli-e2e-default/
e2e-0:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=0 --nosilent
e2e-1:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=1 --nosilent
e2e-2:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=2 --nosilent
e2e-3:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=3 --nosilent
# E2E test for Angular nightly.
e2e-setup-nightly:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- run: mkdir /workspace
- run: mkdir /workspace/angular-cli-e2e-nightly
# Ignore all tests, we just want the setup step to persist it to the workspace.
- run: node tests/run_e2e.js --tmpdir=/workspace/angular-cli-e2e-nightly --ignore=**/* --nightly
- run: mv dist /workspace/
- persist_to_workspace:
root: /workspace
paths:
- dist/
- angular-cli-e2e-nightly/
e2e-0-nightly:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-nightly/test-project --nb-shards=4 --shard=0 --nosilent --nightly
e2e-1-nightly:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-nightly/test-project --nb-shards=4 --shard=1 --nosilent --nightly
e2e-2-nightly:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-nightly/test-project --nb-shards=4 --shard=2 --nosilent --nightly
e2e-3-nightly:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *restore_cache_defaults
- attach_workspace:
<<: *attach_workspace_defaults
- run: cp -r /workspace/dist/ ./
- run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-nightly/test-project --nb-shards=4 --shard=3 --nosilent --nightly
workflows:
version: 2
build_and_test:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
# E2E test for current Angular.
- e2e-setup:
requires:
- build
- e2e-0:
requires:
- e2e-setup
- e2e-1:
requires:
- e2e-setup
- e2e-2:
requires:
- e2e-setup
- e2e-3:
requires:
- e2e-setup
# E2E test for Angular nightly.
- e2e-setup-nightly:
requires:
- build
filters:
branches:
only:
- master
- e2e-0-nightly:
requires:
- e2e-setup-nightly
- e2e-1-nightly:
requires:
- e2e-setup-nightly
- e2e-2-nightly:
requires:
- e2e-setup-nightly
- e2e-3-nightly:
requires:
- e2e-setup-nightly