2018-11-09 18:08:48 +01:00
|
|
|
version: 2
|
|
|
|
|
2018-11-11 13:51:30 +01:00
|
|
|
defaults: &defaults
|
|
|
|
docker:
|
2021-05-07 12:57:07 +02:00
|
|
|
- image: circleci/node:15.14.0
|
2018-11-11 13:51:30 +01:00
|
|
|
working_directory: ~/gatsby-starter-lumen
|
|
|
|
|
2018-11-09 18:08:48 +01:00
|
|
|
jobs:
|
2018-11-11 13:51:30 +01:00
|
|
|
install:
|
|
|
|
<<: *defaults
|
2018-11-09 18:08:48 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2018-11-11 13:07:39 +01:00
|
|
|
- dependencies-{{ checksum "yarn.lock" }}
|
2018-11-11 13:51:30 +01:00
|
|
|
- run: yarn install --frozen-lockfile
|
2018-11-09 18:08:48 +01:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- node_modules
|
2018-11-11 13:07:39 +01:00
|
|
|
key: dependencies-{{ checksum "yarn.lock" }}
|
2018-11-11 13:51:30 +01:00
|
|
|
|
|
|
|
lint:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2019-05-09 20:28:50 +02:00
|
|
|
- dependencies-{{ checksum "yarn.lock" }}
|
2018-11-11 13:51:30 +01: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:
|
2021-01-10 01:05:20 +01:00
|
|
|
- coverage-{{ .Environment.CIRCLE_SHA1 }}
|
2018-11-11 13:51:30 +01:00
|
|
|
- run: yarn global add codecov
|
|
|
|
- run: yarn codecov
|
|
|
|
|
2018-11-09 18:08:48 +01:00
|
|
|
workflows:
|
|
|
|
version: 2
|
2018-11-11 13:59:49 +01:00
|
|
|
test:
|
2018-11-09 18:08:48 +01:00
|
|
|
jobs:
|
2018-11-11 13:51:30 +01:00
|
|
|
- install
|
|
|
|
- lint:
|
|
|
|
requires:
|
|
|
|
- install
|
|
|
|
- test:
|
|
|
|
requires:
|
|
|
|
- install
|
|
|
|
- coverage:
|
|
|
|
requires:
|
|
|
|
- install
|
|
|
|
- codecov:
|
|
|
|
requires:
|
2021-01-10 01:05:20 +01:00
|
|
|
- coverage
|