fcoin/.circleci/config.yml
Nodar Chkuaselidze 2086385f38
pkg: add ci
2018-07-10 15:11:13 +05:30

69 lines
1.6 KiB
YAML

version: 2.0
jobs:
install:
docker:
- image: circleci/node:10.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
test:
docker:
- image: circleci/node:10.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Tests with coverage
command: npm run test-ci
- run:
name: Install codecov
command: npm i codecov
- run:
name: Submit coverage
command: ./node_modules/.bin/codecov
lint:
docker:
- image: circleci/node:10.2
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Lint
command: npm run lint-ci
workflows:
version: 2
test_and_lint:
jobs:
- install
- lint:
requires:
- install
- test:
requires:
- install