rickvanlieshout.com/.circleci/config.yml

82 lines
1.7 KiB
YAML
Raw Normal View History

2018-11-09 18:08:48 +01:00
version: 2
2018-11-11 13:51:30 +01:00
defaults: &defaults
docker:
- image: circleci/node:10.22.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:
- coverage-output-{{ .Environment.CIRCLE_SHA1 }}
- 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:
- coverage