Skip to content

build(ci): add config for circleci #8460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration file for https://circleci.com/gh/angular/material2

# 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
working_directory: ~/ng
docker:
- image: angular/ngcontainer:0.0.4

# After checkout, rebase on top of master.
# Similar to travis behavior, but not quite the same.
# By default, PRs are not rebased on top of master, which we want.
# See https://discuss.circleci.com/t/1662
anchor_2: &post_checkout
post: git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge"

version: 2
jobs:
build:
<<: *job_defaults
steps:
- checkout:
<<: *post_checkout
- restore_cache:
key: material2-{{ .Branch }}-{{ checksum "package-lock.json" }}

- run: bazel build src/cdk/...
- save_cache:
key: material2-{{ .Branch }}-{{ checksum "package-lock.json" }}
paths:
- "node_modules"

workflows:
version: 2
default_workflow:
jobs:
- build