From 7395a646684e057e23cc0c685cc0281586edb9f1 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 14 Jun 2017 16:38:27 -0700 Subject: [PATCH] build: circleci workflows to run lint in parallel --- .circleci/config.yml | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f661fae0e..c02eb86d22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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