Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
[ci] break workflow in multiple parallel steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhyde committed Feb 4, 2018
1 parent 82320a2 commit d98a21a
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,45 @@
version: 2
jobs:
build:
setup:
docker:
- image: circleci/node:9
steps:
- checkout
- run:
name: checkout-submodule
name: Checkout submodules
command: git submodule update --init --recursive
- run:
name: update-npm
name: Install latest version of npm
command: sudo npm install -g npm@latest
- restore_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
- run:
name: install-dependencies
name: Install project dependencies
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
- persist_to_workspace:
root: .
paths: node_modules

test:
docker:
- image: circleci/node:9
steps:
- run:
name: test
command: npm run test

build:
docker:
- image: circleci/node:9
steps:
- run:
name: build
command: npm run build

deploy:
machine: true
steps:
Expand All @@ -44,7 +58,13 @@ workflows:
version: 2
build-and-deploy:
jobs:
- setup
- test
requires:
- setup
- build
requires:
- setup
- deploy:
requires:
- build
Expand Down

0 comments on commit d98a21a

Please sign in to comment.