.circleci/config.yml
version: 2
general:
branches:
ignore:
- gh-pages
only:
- master
- /feature-.*/
jobs:
build:
environment:
- NODE_ENV: development
- EMAIL: "simon@simonwjackson.com"
- GIT_AUTHOR_NAME: "Simon W. Jackson"
- GIT_COMMITTER_NAME: "Simon W. Jackson"
docker:
- image: circleci/node:9.7.1
steps:
- checkout
- run:
name: Update npm
command: 'sudo npm install -g npm@latest'
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install npm wee
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Test
command: npm run test
- store_artifacts:
path: coverage
prefix: coverage
- run:
name: Coverage
command: bash <(curl -s https://codecov.io/bash)
- run:
name: Build all
command: npm run build
- run:
name: release
command: npm run release || true
- run:
name: Deploy guide
command: npm run deploy
workflows:
version: 2
build_and_test:
jobs:
- build:
filters:
branches:
only: master