Skip to content

Instantly share code, notes, and snippets.

@victormejia
Last active May 4, 2018 22:32
Show Gist options
  • Save victormejia/2bc34d8ff558143a4c5ac782ebe274e4 to your computer and use it in GitHub Desktop.
Save victormejia/2bc34d8ff558143a4c5ac782ebe274e4 to your computer and use it in GitHub Desktop.
version: 2
references:
setup: &setup
working_directory: ~/ng-components
docker:
- image: circleci/node:8-browsers
deps-restore: &deps-restore
restore_cache:
key: ng-components-cache-{{ checksum "package-lock.json" }}
deps-cache: &deps-cache
save_cache:
key: ng-components-cache-{{ checksum "package-lock.json" }}
paths:
- ./node_modules
jobs:
checkout-and-install:
<<: *setup
steps:
- checkout
- <<: *deps-restore
- run: npm install --silent
- <<: *deps-cache
test:
<<: *setup
steps:
- checkout
- <<: *deps-restore
- run:
name: Run tests
command: npm run test:lib
build:
<<: *setup
steps:
- checkout
- <<: *deps-restore
- run:
name: Build Library
command: npm run build:lib
workflows:
version: 2
test-and-build:
jobs:
- checkout-and-install
- test:
requires:
- checkout-and-install
- build:
requires:
- test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment