Select Git revision
config.yml 1.12 KiB
version: 2
jobs:
install:
docker:
- image: node:12
steps:
- checkout
- restore_cache:
key: v1-node12-{{ .Branch }}-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: |
npm install -g npm@6.13
npm install
- save_cache:
key: v1-node12-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ./node_modules
test:
docker:
- image: node:12
steps:
- checkout
- restore_cache:
key: v1-node12-{{ .Branch }}-{{ checksum "package.json" }}
- run:
name: Run tests
command: npm test
check_linting:
docker:
- image: node:12
steps:
- checkout
- restore_cache:
key: v1-node12-{{ .Branch }}-{{ checksum "package.json" }}
- run:
name: Check code linting
command: npm run code:check
workflows:
version: 2
test_and_check_linting:
jobs:
- install
- test:
requires:
- install
- check_linting:
requires:
- install