mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-26 14:59:14 +01:00
105 lines
2.2 KiB
YAML
105 lines
2.2 KiB
YAML
version: 2
|
|
|
|
defaults: &defaults
|
|
docker:
|
|
- image: circleci/node:10.15.3
|
|
working_directory: ~/gatsby-starter-lumen
|
|
|
|
jobs:
|
|
install:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "yarn.lock" }}
|
|
- run: yarn install --frozen-lockfile
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: dependencies-{{ checksum "yarn.lock" }}
|
|
|
|
flow-typed:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "yarn.lock" }}
|
|
- restore_cache:
|
|
keys:
|
|
- flow-typed-{{ checksum "yarn.lock" }}
|
|
- run: yarn flow-typed
|
|
- save_cache:
|
|
paths:
|
|
- flow-typed
|
|
key: flow-typed-{{ checksum "yarn.lock" }}
|
|
|
|
lint:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "yarn.lock" }}
|
|
- restore_cache:
|
|
keys:
|
|
- flow-typed-{{ checksum "yarn.lock" }}
|
|
- 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
|
|
|
|
workflows:
|
|
version: 2
|
|
test:
|
|
jobs:
|
|
- install
|
|
- flow-typed:
|
|
requires:
|
|
- install
|
|
- lint:
|
|
requires:
|
|
- flow-typed
|
|
- install
|
|
- test:
|
|
requires:
|
|
- install
|
|
- coverage:
|
|
requires:
|
|
- install
|
|
- codecov:
|
|
requires:
|
|
- coverage |