brainspan
Version:
When dealing with units of measure, Brainspan does the thinking so you don't have to.
77 lines (71 loc) • 1.67 kB
YAML
version: 2
references:
workspace_root: &workspace_root ~/brainspan
attach_workspace:
attach_workspace:
at:
defaults:
working_directory:
docker:
- image: circleci/node:8
jobs:
build:
<<:
steps:
- checkout
- run:
name: Set up .npmrc
command: "echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc"
- restore_cache:
key: npm-dependency-cache-{{ checksum "package.json" }}
- run: "npm install"
- save_cache:
key: npm-dependency-cache-{{ checksum "package.json" }}
paths:
- ./node_modules
- persist_to_workspace:
root:
paths:
- .
test:
<<:
steps:
-
- run:
name: Tests
command: npm run test:ci
- store_artifacts:
path: coverage
prefix: coverage
publish:
<<:
steps:
- checkout
- run:
name: Set up .npmrc
command: "echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc"
- deploy:
name: NPM Publish
command: npm publish
workflows:
version: 2
build_test:
jobs:
- build:
filters:
branches:
only: /.*/
- test:
requires:
- build
filters:
branches:
only: /.*/
publish:
jobs:
- publish:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-\d+)?/