build: circleci workflows to run lint in parallel

This commit is contained in:
Alex Eagle 2017-06-14 16:38:27 -07:00 committed by Matias Niemelä
parent 979bfd07e1
commit 7395a64668
1 changed files with 30 additions and 8 deletions

View File

@ -1,9 +1,12 @@
defaults: &defaults
working_directory: ~/ng
docker:
- image: angular/ngcontainer
version: 2
jobs:
build:
working_directory: ~/ng
docker:
- image: angular/ngcontainer
lint:
<<: *defaults
steps:
- checkout:
# After checkout, rebase on top of master.
@ -14,11 +17,30 @@ jobs:
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
- run: npm install
- run: npm run postinstall
- run: ./node_modules/.bin/gulp lint
# Build twice, workaround for
# https://github.com/bazelbuild/bazel/issues/3114
- run: bazel build ... || bazel build ...
- save_cache:
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
paths:
- "node_modules"
- run: ./node_modules/.bin/gulp lint
build:
<<: *defaults
steps:
- checkout
- restore_cache:
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
- run: npm install
- run: npm run postinstall
- save_cache:
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
paths:
- "node_modules"
# Build twice, workaround for
# https://github.com/bazelbuild/bazel/issues/3114
- run: bazel build ... || bazel build ...
workflows:
version: 2
default_workflow:
jobs:
- lint
- build