1
1
# Configuration file for https://circleci.com/gh/angular/material
2
- # TODO: Remove testing against AngularJS 1.5.x and 1.6.x in 1.2.0.
3
2
4
3
# Note: YAML anchors allow an object to be re-used, reducing duplication.
5
4
# The ampersand declares an alias for an object, then later the `<<: *name`
8
7
# To validate changes, use an online parser, eg. http://yaml-online-parser.appspot.com/
9
8
10
9
# Find the latest version here: https://github.com/CircleCI-Public/circleci-dockerfiles/tree/master/node/images
11
- var_1 : &docker_image circleci/node:14.4.0 -browsers
10
+ var_1 : &docker_image circleci/node:14.15.1 -browsers
12
11
var_2 : &cache_key angularjs-material-{{ checksum "package-lock.json" }}
13
12
14
13
# Settings common to each job
@@ -17,23 +16,15 @@ var_3: &job_defaults
17
16
docker :
18
17
- image : *docker_image
19
18
20
- # Job step for checking out the source code from GitHub. This also ensures that the source code
21
- # is rebased on top of master.
22
- var_4 : &checkout_code
23
- checkout :
24
- # After checkout, rebase on top of master. By default, PRs are not rebased on top of master,
25
- # which we want. See https://discuss.circleci.com/t/1662
26
- post : git pull --ff-only origin "refs/pull/${CIRCLE_PULL_REQUEST//*pull\//}/merge"
27
-
28
19
# Restores the cache that could be available for the current lock file. The cache
29
20
# includes the node modules.
30
- var_5 : &restore_cache
21
+ var_4 : &restore_cache
31
22
restore_cache :
32
23
key : *cache_key
33
24
34
25
# Saves the cache for the current lock file. We store the node modules cache in order to make
35
26
# subsequent builds faster.
36
- var_6 : &save_cache
27
+ var_5 : &save_cache
37
28
save_cache :
38
29
key : *cache_key
39
30
paths :
@@ -45,28 +36,39 @@ var_6: &save_cache
45
36
# NPM with the frozen lockfile option in order to make sure that lock file and package.json are
46
37
# in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because
47
38
# CircleCI automatically discards the cache if the checksum of the lock file has changed.
48
- var_7 : &npm_install
39
+ var_6 : &npm_install
49
40
run : npm ci
50
41
51
- var_8 : &rebuild_node_sass
42
+ var_7 : &rebuild_node_sass
52
43
run : npm rebuild node-sass
53
44
54
- var_9 : &store_junit_test_results
45
+ var_8 : &store_junit_test_results
55
46
store_test_results :
56
47
path : ./artifacts/junit
57
48
58
49
# Branch filter that we can specify for jobs that should only run on publish branches. This filter
59
50
# is used to ensure that not all upstream branches will be published as Github builds
60
51
# (e.g. revert branches, feature branches)
61
- var_10 : &publish_branches_filter
52
+ var_9 : &publish_branches_filter
62
53
branches :
63
54
only :
64
55
- master
65
56
66
57
# -----------------------------
67
58
# Container version of CircleCI
68
59
# -----------------------------
69
- version : 2
60
+ version : 2.1
61
+
62
+ commands :
63
+ # Command for checking out the source code from GitHub. This also ensures that the source code
64
+ # is rebased on top of master.
65
+ checkout_and_rebase :
66
+ description : Checkout and rebase the repository
67
+ steps :
68
+ - checkout
69
+ # After checkout, rebase on top of master. By default, PRs are not rebased on top of master,
70
+ # which we want. See https://discuss.circleci.com/t/1662
71
+ - run : git pull --ff-only origin "refs/pull/${CIRCLE_PULL_REQUEST//*pull\//}/merge"
70
72
71
73
# -----------------------------------------------------------------------------------------
72
74
# Job definitions. Jobs which are defined just here, will not run automatically. Each job
80
82
lint :
81
83
<< : *job_defaults
82
84
steps :
83
- - *checkout_code
85
+ - checkout_and_rebase
84
86
- *restore_cache
85
87
- *npm_install
86
88
- *rebuild_node_sass
92
94
build :
93
95
<< : *job_defaults
94
96
steps :
95
- - *checkout_code
97
+ - checkout_and_rebase
96
98
- *restore_cache
97
99
- *npm_install
98
100
- *rebuild_node_sass
@@ -103,45 +105,23 @@ jobs:
103
105
# Jobs that run the unit tests on locally installed browsers (Chrome and Firefox headless).
104
106
# The available browsers are included in the Docker image.
105
107
# ------------------------------------------------------------------------------------------
106
- test_angularjs_1.5 :
107
- << : *job_defaults
108
- environment :
109
- NG_VERSION : " 1.5"
110
- steps :
111
- - *checkout_code
112
- - *restore_cache
113
- - *npm_install
114
- - run : ./scripts/circleci/run-tests.sh
115
- - *store_junit_test_results
116
-
117
- test_angularjs_1.6 :
118
- << : *job_defaults
119
- environment :
120
- NG_VERSION : " 1.6"
121
- steps :
122
- - *checkout_code
123
- - *restore_cache
124
- - *npm_install
125
- - run : ./scripts/circleci/run-tests.sh
126
- - *store_junit_test_results
127
-
128
- test_angularjs_1.7 :
108
+ test_angularjs_1_7 :
129
109
<< : *job_defaults
130
110
environment :
131
111
NG_VERSION : " 1.7"
132
112
steps :
133
- - *checkout_code
113
+ - checkout_and_rebase
134
114
- *restore_cache
135
115
- *npm_install
136
116
- run : ./scripts/circleci/run-tests.sh
137
117
- *store_junit_test_results
138
118
139
- test_angularjs_1.8 :
119
+ test_angularjs_1_8 :
140
120
<< : *job_defaults
141
121
environment :
142
122
NG_VERSION : " 1.8"
143
123
steps :
144
- - *checkout_code
124
+ - checkout_and_rebase
145
125
- *restore_cache
146
126
- *npm_install
147
127
- run : ./scripts/circleci/run-tests.sh
@@ -152,7 +132,7 @@ jobs:
152
132
environment :
153
133
NG_VERSION : " snapshot"
154
134
steps :
155
- - *checkout_code
135
+ - checkout_and_rebase
156
136
- *restore_cache
157
137
- *npm_install
158
138
- run : ./scripts/circleci/run-tests.sh
@@ -164,7 +144,7 @@ jobs:
164
144
update_and_snapshot_docs :
165
145
<< : *job_defaults
166
146
steps :
167
- - *checkout_code
147
+ - checkout_and_rebase
168
148
- *restore_cache
169
149
- *npm_install
170
150
-
run :
sudo npm i -g [email protected]
@@ -188,16 +168,10 @@ workflows:
188
168
build_and_test :
189
169
jobs :
190
170
- build
191
- - test_angularjs_1.5 :
192
- requires :
193
- - build
194
- - test_angularjs_1.6 :
195
- requires :
196
- - build
197
- - test_angularjs_1.7 :
171
+ - test_angularjs_1_7 :
198
172
requires :
199
173
- build
200
- - test_angularjs_1.8 :
174
+ - test_angularjs_1_8 :
201
175
requires :
202
176
- build
203
177
- test_angularjs_snapshot :
@@ -206,8 +180,6 @@ workflows:
206
180
- update_and_snapshot_docs :
207
181
filters : *publish_branches_filter
208
182
requires :
209
- - test_angularjs_1.5
210
- - test_angularjs_1.6
211
- - test_angularjs_1.7
212
- - test_angularjs_1.8
183
+ - test_angularjs_1_7
184
+ - test_angularjs_1_8
213
185
- test_angularjs_snapshot
0 commit comments