Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 0dff19f

Browse files
committed
ci: update CircleCI to 2.1, NodeJS to 14.15.1
- remove CI runs against AngularJS 1.5.x and 1.6.x - migrate away from previous style of post checkout steps - change job names to pass new schema formatting rules
1 parent e6b5482 commit 0dff19f

File tree

2 files changed

+32
-60
lines changed

2 files changed

+32
-60
lines changed

.circleci/config.yml

+31-59
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# 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.
32

43
# Note: YAML anchors allow an object to be re-used, reducing duplication.
54
# The ampersand declares an alias for an object, then later the `<<: *name`
@@ -8,7 +7,7 @@
87
# To validate changes, use an online parser, eg. http://yaml-online-parser.appspot.com/
98

109
# 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
1211
var_2: &cache_key angularjs-material-{{ checksum "package-lock.json" }}
1312

1413
# Settings common to each job
@@ -17,23 +16,15 @@ var_3: &job_defaults
1716
docker:
1817
- image: *docker_image
1918

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-
2819
# Restores the cache that could be available for the current lock file. The cache
2920
# includes the node modules.
30-
var_5: &restore_cache
21+
var_4: &restore_cache
3122
restore_cache:
3223
key: *cache_key
3324

3425
# Saves the cache for the current lock file. We store the node modules cache in order to make
3526
# subsequent builds faster.
36-
var_6: &save_cache
27+
var_5: &save_cache
3728
save_cache:
3829
key: *cache_key
3930
paths:
@@ -45,28 +36,39 @@ var_6: &save_cache
4536
# NPM with the frozen lockfile option in order to make sure that lock file and package.json are
4637
# in sync. Unlike in Travis, we don't need to manually purge the node modules if stale because
4738
# CircleCI automatically discards the cache if the checksum of the lock file has changed.
48-
var_7: &npm_install
39+
var_6: &npm_install
4940
run: npm ci
5041

51-
var_8: &rebuild_node_sass
42+
var_7: &rebuild_node_sass
5243
run: npm rebuild node-sass
5344

54-
var_9: &store_junit_test_results
45+
var_8: &store_junit_test_results
5546
store_test_results:
5647
path: ./artifacts/junit
5748

5849
# Branch filter that we can specify for jobs that should only run on publish branches. This filter
5950
# is used to ensure that not all upstream branches will be published as Github builds
6051
# (e.g. revert branches, feature branches)
61-
var_10: &publish_branches_filter
52+
var_9: &publish_branches_filter
6253
branches:
6354
only:
6455
- master
6556

6657
# -----------------------------
6758
# Container version of CircleCI
6859
# -----------------------------
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"
7072

7173
# -----------------------------------------------------------------------------------------
7274
# Job definitions. Jobs which are defined just here, will not run automatically. Each job
@@ -80,7 +82,7 @@ jobs:
8082
lint:
8183
<<: *job_defaults
8284
steps:
83-
- *checkout_code
85+
- checkout_and_rebase
8486
- *restore_cache
8587
- *npm_install
8688
- *rebuild_node_sass
@@ -92,7 +94,7 @@ jobs:
9294
build:
9395
<<: *job_defaults
9496
steps:
95-
- *checkout_code
97+
- checkout_and_rebase
9698
- *restore_cache
9799
- *npm_install
98100
- *rebuild_node_sass
@@ -103,45 +105,23 @@ jobs:
103105
# Jobs that run the unit tests on locally installed browsers (Chrome and Firefox headless).
104106
# The available browsers are included in the Docker image.
105107
# ------------------------------------------------------------------------------------------
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:
129109
<<: *job_defaults
130110
environment:
131111
NG_VERSION: "1.7"
132112
steps:
133-
- *checkout_code
113+
- checkout_and_rebase
134114
- *restore_cache
135115
- *npm_install
136116
- run: ./scripts/circleci/run-tests.sh
137117
- *store_junit_test_results
138118

139-
test_angularjs_1.8:
119+
test_angularjs_1_8:
140120
<<: *job_defaults
141121
environment:
142122
NG_VERSION: "1.8"
143123
steps:
144-
- *checkout_code
124+
- checkout_and_rebase
145125
- *restore_cache
146126
- *npm_install
147127
- run: ./scripts/circleci/run-tests.sh
@@ -152,7 +132,7 @@ jobs:
152132
environment:
153133
NG_VERSION: "snapshot"
154134
steps:
155-
- *checkout_code
135+
- checkout_and_rebase
156136
- *restore_cache
157137
- *npm_install
158138
- run: ./scripts/circleci/run-tests.sh
@@ -164,7 +144,7 @@ jobs:
164144
update_and_snapshot_docs:
165145
<<: *job_defaults
166146
steps:
167-
- *checkout_code
147+
- checkout_and_rebase
168148
- *restore_cache
169149
- *npm_install
170150
- run: sudo npm i -g [email protected]
@@ -188,16 +168,10 @@ workflows:
188168
build_and_test:
189169
jobs:
190170
- 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:
198172
requires:
199173
- build
200-
- test_angularjs_1.8:
174+
- test_angularjs_1_8:
201175
requires:
202176
- build
203177
- test_angularjs_snapshot:
@@ -206,8 +180,6 @@ workflows:
206180
- update_and_snapshot_docs:
207181
filters: *publish_branches_filter
208182
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
213185
- test_angularjs_snapshot

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
12
1+
14

0 commit comments

Comments
 (0)