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

Commit e082185

Browse files
committed
ci: ensure that the project builds successfully. update NodeJS
- update NodeJS v10 to v12 - test that both installing the docs-content and building pass - Template Type Checking errors aren't emitted for `ng test` - so it's possible to have lint and test pass when the project doesn't build - we've also had issues this year where build:content was broken and we didn't notice
1 parent f919ec8 commit e082185

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.circleci/config.yml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Cache key for CircleCI. We want to invalidate the cache whenever the Yarn lock file changes.
22
var_1: &cache_key material-angular-io-{{ checksum "yarn.lock" }}
3-
var_2: &default_docker_image circleci/node:10.16.3-browsers
3+
var_2: &default_docker_image circleci/node:12.9.1-browsers
44

55
# Settings common to each job
66
var_3: &job_defaults
@@ -12,26 +12,47 @@ var_4: &save_cache
1212
save_cache:
1313
key: *cache_key
1414
paths:
15-
- "node_modules/"
15+
- "node_modules"
1616

1717
var_5: &yarn_install
18-
run: yarn install --frozen-lockfile --non-interactive
18+
run:
19+
name: "Installing project dependencies"
20+
command: yarn install --frozen-lockfile --non-interactive
21+
22+
# Job step for checking out the source code from GitHub. This also ensures that the source code
23+
# is rebased on top of master.
24+
var_6: &checkout_code
25+
checkout:
26+
# After checkout, rebase on top of master. By default, PRs are not rebased on top of master,
27+
# which we want. See https://discuss.circleci.com/t/1662
28+
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
1929

2030
jobs:
2131
lint:
2232
<<: *job_defaults
2333
steps:
24-
- checkout
34+
- *checkout_code
2535
- restore_cache:
2636
key: *cache_key
2737
- *yarn_install
2838
- run: yarn lint
2939
- *save_cache
3040

41+
build:
42+
<<: *job_defaults
43+
steps:
44+
- *checkout_code
45+
- restore_cache:
46+
key: *cache_key
47+
- *yarn_install
48+
- run: yarn build:content
49+
- run: yarn prod-build
50+
- *save_cache
51+
3152
test:
3253
<<: *job_defaults
3354
steps:
34-
- checkout
55+
- *checkout_code
3556
- restore_cache:
3657
key: *cache_key
3758
- *yarn_install
@@ -42,4 +63,5 @@ workflows:
4263
default_workflow:
4364
jobs:
4465
- lint
66+
- build
4567
- test

0 commit comments

Comments
 (0)