.circleci/config.yml
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm i
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: "JavaScript Linter"
command: npm run lint -- --format junit -o reports/junit/js-lint-results.xml
- run:
name: "JavaScript Test Suite"
environment:
JEST_JUNIT_OUTPUT: reports/junit/js-test-results.xml
command: npm run test-ci -- --ci --testResultsProcessor="jest-junit"
post:
- coveralls
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit