2017-07-13 15:16:02 -04:00
|
|
|
# Configuration file for https://circleci.com/gh/angular/angular
|
|
|
|
|
|
|
|
# Note: YAML anchors allow an object to be re-used, reducing duplication.
|
|
|
|
# The ampersand declares an alias for an object, then later the `<<: *name`
|
|
|
|
# syntax dereferences it.
|
|
|
|
# See http://blog.daemonl.com/2016/02/yaml.html
|
|
|
|
# To validate changes, use an online parser, eg.
|
|
|
|
# http://yaml-online-parser.appspot.com/
|
|
|
|
|
|
|
|
# Settings common to each job
|
|
|
|
anchor_1: &job_defaults
|
2017-06-14 19:38:27 -04:00
|
|
|
working_directory: ~/ng
|
|
|
|
docker:
|
|
|
|
- image: angular/ngcontainer
|
|
|
|
|
2017-07-13 15:16:02 -04:00
|
|
|
# After checkout, rebase on top of master.
|
|
|
|
# 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"
|
|
|
|
|
2017-06-02 20:03:15 -04:00
|
|
|
version: 2
|
|
|
|
jobs:
|
2017-06-14 19:38:27 -04:00
|
|
|
lint:
|
2017-07-13 15:16:02 -04:00
|
|
|
<<: *job_defaults
|
2017-06-02 20:03:15 -04:00
|
|
|
steps:
|
2017-06-22 17:55:33 -04:00
|
|
|
- checkout:
|
2017-07-13 15:16:02 -04:00
|
|
|
<<: *post_checkout
|
2017-06-02 20:03:15 -04:00
|
|
|
- restore_cache:
|
|
|
|
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
2017-06-21 00:08:20 -04:00
|
|
|
|
2017-06-02 20:03:15 -04:00
|
|
|
- run: npm install
|
2017-06-26 16:22:26 -04:00
|
|
|
- run: npm run postinstall
|
2017-06-02 20:03:15 -04:00
|
|
|
- run: ./node_modules/.bin/gulp lint
|
2017-06-21 00:08:20 -04:00
|
|
|
|
2017-06-14 19:38:27 -04:00
|
|
|
build:
|
2017-07-13 15:16:02 -04:00
|
|
|
<<: *job_defaults
|
2017-06-14 19:38:27 -04:00
|
|
|
steps:
|
2017-07-13 15:16:02 -04:00
|
|
|
- checkout:
|
|
|
|
<<: *post_checkout
|
2017-06-14 19:38:27 -04:00
|
|
|
- restore_cache:
|
|
|
|
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
2017-06-21 00:08:20 -04:00
|
|
|
|
2017-07-21 17:11:35 -04:00
|
|
|
- run: bazel run @build_bazel_rules_typescript_node//:bin/npm install
|
2017-07-19 17:01:28 -04:00
|
|
|
- run: bazel build packages/...
|
2017-06-02 20:03:15 -04:00
|
|
|
- save_cache:
|
|
|
|
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
|
|
|
paths:
|
|
|
|
- "node_modules"
|
2017-06-14 19:38:27 -04:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
default_workflow:
|
|
|
|
jobs:
|
|
|
|
- lint
|
|
|
|
- build
|