build: circleci workflows to run lint in parallel
This commit is contained in:
parent
979bfd07e1
commit
7395a64668
@ -1,9 +1,12 @@
|
|||||||
version: 2
|
defaults: &defaults
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
working_directory: ~/ng
|
working_directory: ~/ng
|
||||||
docker:
|
docker:
|
||||||
- image: angular/ngcontainer
|
- image: angular/ngcontainer
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
<<: *defaults
|
||||||
steps:
|
steps:
|
||||||
- checkout:
|
- checkout:
|
||||||
# After checkout, rebase on top of master.
|
# After checkout, rebase on top of master.
|
||||||
@ -14,11 +17,30 @@ jobs:
|
|||||||
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run postinstall
|
- 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:
|
- save_cache:
|
||||||
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
key: angular-{{ .Branch }}-{{ checksum "npm-shrinkwrap.json" }}
|
||||||
paths:
|
paths:
|
||||||
- "node_modules"
|
- "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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user