2018-11-09 18:08:48 +01:00
|
|
|
version: 2
|
|
|
|
|
2018-11-11 13:51:30 +01:00
|
|
|
defaults: &defaults
|
|
|
|
docker:
|
2022-08-26 18:50:01 +02:00
|
|
|
- image: cimg/node:18.8.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:
|
2022-04-16 16:25:55 +02:00
|
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
|
|
- run: npm ci
|
2018-11-09 18:08:48 +01:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- node_modules
|
2022-04-16 16:25:55 +02:00
|
|
|
key: dependencies-{{ checksum "package-lock.json" }}
|
2018-11-11 13:51:30 +01:00
|
|
|
|
|
|
|
lint:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-04-16 16:25:55 +02:00
|
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
|
|
- run: npm run lint
|
2018-11-11 13:51:30 +01:00
|
|
|
|
|
|
|
test:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-04-16 16:25:55 +02:00
|
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
|
|
- run: npm run test --runInBand --no-cache
|
2018-11-11 13:51:30 +01:00
|
|
|
|
|
|
|
coverage:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-04-16 16:25:55 +02:00
|
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
|
|
- run: npm run test:coverage --runInBand --no-cache
|
2018-11-11 13:51:30 +01:00
|
|
|
- save_cache:
|
|
|
|
key: coverage-{{ .Environment.CIRCLE_SHA1 }}
|
|
|
|
paths:
|
|
|
|
- coverage
|
|
|
|
|
|
|
|
codecov:
|
|
|
|
<<: *defaults
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-04-16 16:25:55 +02:00
|
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
2018-11-11 13:51:30 +01:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2021-01-10 01:05:20 +01:00
|
|
|
- coverage-{{ .Environment.CIRCLE_SHA1 }}
|
2022-04-16 16:25:55 +02:00
|
|
|
- run: npx 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
|