mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-30 16:54:11 +01:00
82 lines
1.7 KiB
YAML
82 lines
1.7 KiB
YAML
version: 2
|
|
|
|
defaults: &defaults
|
|
docker:
|
|
- image: cimg/node:18.1.0
|
|
working_directory: ~/gatsby-starter-lumen
|
|
|
|
jobs:
|
|
install:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
- run: npm ci
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: dependencies-{{ checksum "package-lock.json" }}
|
|
|
|
lint:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
- run: npm run lint
|
|
|
|
test:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
- run: npm run test --runInBand --no-cache
|
|
|
|
coverage:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
- run: npm run test:coverage --runInBand --no-cache
|
|
- save_cache:
|
|
key: coverage-{{ .Environment.CIRCLE_SHA1 }}
|
|
paths:
|
|
- coverage
|
|
|
|
codecov:
|
|
<<: *defaults
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- dependencies-{{ checksum "package-lock.json" }}
|
|
- restore_cache:
|
|
keys:
|
|
- coverage-{{ .Environment.CIRCLE_SHA1 }}
|
|
- run: npx codecov
|
|
|
|
workflows:
|
|
version: 2
|
|
test:
|
|
jobs:
|
|
- install
|
|
- lint:
|
|
requires:
|
|
- install
|
|
- test:
|
|
requires:
|
|
- install
|
|
- coverage:
|
|
requires:
|
|
- install
|
|
- codecov:
|
|
requires:
|
|
- coverage
|