Repository navigation
Expand file tree
/
Copy pathconfig.yml
More file actions
59 lines (49 loc) · 2.13 KB
/
Copy pathconfig.yml
File metadata and controls
59 lines (49 loc) · 2.13 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
# This file configures the build at https://circleci.com/gh/alexeagle/angular-bazel-example
# Complete documentation is at https://circleci.com/docs/2.0/
# We use a docker image as the basis for our build, so that all the toolchains we use
# are already installed and the build can start running right away. It also guarantees
# the environment is portable and reproducible on your local machine.
var_1: &docker_image angular/ngcontainer:0.1.0
# CircleCI lets us pick the key for storing one or more caches, to speed up subsequent builds.
# We can use this to avoid re-fetching our dependencies from npm on every build.
# To ensure we don't load a stale cache, we invalidate it based on the entries in the key:
# - the checksum of Yarn's lock file
# - the branch we are on, which really shouldn't be needed since the yarn lock file should be hermetic
# - the docker image tag, working around an issue we saw where changing docker images causes permission
# errors when restoring the cache, like when the user we run as changes
var_2: &cache_key angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.1.0
# Each job will inherit these defaults
anchor_1: &job_defaults
working_directory: ~/ng
docker:
- image: *docker_image
# After checkout, rebase on top of master, because we want to test the proposed merge of a
# onto the target branch, not just test what's on the user's fork.
# Similar to travis behavior, but not quite the same.
# See https://discuss.circleci.com/t/1662
anchor_2: &post_checkout
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"
# Opt-in to the new goodness
version: 2
# These jobs will run in parallel, and report separate statuses to GitHub PRs
jobs:
build:
<<: *job_defaults
steps:
- checkout:
<<: *post_checkout
- restore_cache:
key: *cache_key
- store_artifacts:
path: size.js
destination: size.js
# If we get this far, save the node_modules directory for use next time.
- save_cache:
key: *cache_key
paths:
- "node_modules"
workflows:
version: 2
default_workflow:
jobs:
- build