105 lines
2.2 KiB
YAML
Raw Normal View History

2018-11-09 20:08:48 +03:00
version: 2
2018-11-11 15:51:30 +03:00
defaults: &defaults
docker:
- image: circleci/node:10.16.0
2018-11-11 15:51:30 +03:00
working_directory: ~/gatsby-starter-lumen
2018-11-09 20:08:48 +03:00
jobs:
2018-11-11 15:51:30 +03:00
install:
<<: *defaults
2018-11-09 20:08:48 +03:00
steps:
- checkout
- restore_cache:
keys:
2018-11-11 15:07:39 +03:00
- dependencies-{{ checksum "yarn.lock" }}
2018-11-11 15:51:30 +03:00
- run: yarn install --frozen-lockfile
2018-11-09 20:08:48 +03:00
- save_cache:
paths:
- node_modules
2018-11-11 15:07:39 +03:00
key: dependencies-{{ checksum "yarn.lock" }}
2018-11-11 15:51:30 +03:00
2019-05-09 20:34:21 +03:00
flow-typed:
2019-05-09 20:37:29 +03:00
<<: *defaults
2019-05-09 20:34:21 +03:00
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
2019-05-09 21:49:39 +03:00
- restore_cache:
keys:
- flow-typed-{{ checksum "yarn.lock" }}
2019-05-09 20:34:21 +03:00
- run: yarn flow-typed
2019-05-09 20:44:40 +03:00
- save_cache:
paths:
- flow-typed
key: flow-typed-{{ checksum "yarn.lock" }}
2019-05-09 20:34:21 +03:00
2018-11-11 15:51:30 +03:00
lint:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
2019-05-09 21:28:50 +03:00
- dependencies-{{ checksum "yarn.lock" }}
2019-05-09 21:49:39 +03:00
- restore_cache:
keys:
- flow-typed-{{ checksum "yarn.lock" }}
2018-11-11 15:51:30 +03:00
- run: yarn lint
test:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn test --runInBand --no-cache
coverage:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:coverage --runInBand --no-cache
- save_cache:
key: coverage-{{ .Environment.CIRCLE_SHA1 }}
paths:
- coverage
codecov:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- coverage-output-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn global add codecov
- run: yarn codecov
2018-11-09 20:08:48 +03:00
workflows:
version: 2
2018-11-11 15:59:49 +03:00
test:
2018-11-09 20:08:48 +03:00
jobs:
2018-11-11 15:51:30 +03:00
- install
2019-05-09 20:34:21 +03:00
- flow-typed:
requires:
- install
2018-11-11 15:51:30 +03:00
- lint:
requires:
2019-05-09 20:34:21 +03:00
- flow-typed
2018-11-11 15:51:30 +03:00
- install
- test:
requires:
- install
- coverage:
requires:
- install
- codecov:
requires:
- coverage