ddc-commit-hooks
Version:
Configurable commit hook setup
45 lines (41 loc) • 1.16 kB
YAML
version: 2.1
orbs:
codecov: codecov/codecov@1.0.4
jobs:
build:
working_directory: ~/commit-hooks
# The primary container is an instance of the first image listed. The job's commands run in this container.
docker:
- image: circleci/node:latest
# The secondary container is an instance of the second listed image which is run in a common network where ports exposed on the primary container are available on localhost.
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
test:
docker:
- image: circleci/node:latest
steps:
- checkout
- run: npm install
- run: npm run test:cover
- codecov/upload:
file: ./coverage/lcov.info
- store_artifacts:
path: ./coverage/lcov.info
workflows:
version: 2
build_and_test:
jobs:
- build
- test:
requires:
- build
filters:
branches:
only: master