diff2html/.circleci/config.yml

88 lines
1.8 KiB
YAML
Raw Normal View History

2017-10-05 16:28:33 +00:00
version: 2
jobs:
build-common: &common-build
docker:
- image: node
working_directory: ~/diff2html
steps: &common-steps
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
2019-10-13 18:21:19 +00:00
- run: yarn
2017-10-05 16:28:33 +00:00
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
2019-10-13 18:21:19 +00:00
- run: yarn run build
- run: yarn run coverage
2017-10-05 16:28:33 +00:00
build-latest: &latest-build
docker:
- image: node
working_directory: ~/diff2html
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
- run: yarn
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
2019-10-13 18:21:19 +00:00
- run: yarn run build
2017-10-05 16:28:33 +00:00
- run: yarn run lint
- run: yarn run coverage
2017-10-05 16:28:33 +00:00
- run: yarn run codacy
2018-05-05 17:48:14 +00:00
- persist_to_workspace:
root: ~/diff2html
paths:
- docs
- build
2017-10-05 16:28:33 +00:00
2019-10-13 18:21:19 +00:00
build-node_8:
2017-10-05 16:28:33 +00:00
<<: *common-build
docker:
2019-10-13 18:21:19 +00:00
- image: node:8
2017-10-05 16:28:33 +00:00
2019-10-13 18:21:19 +00:00
build-node_10:
2018-06-16 17:42:29 +00:00
<<: *common-build
2017-10-05 16:28:33 +00:00
docker:
2019-10-13 18:21:19 +00:00
- image: node:10
2017-10-05 16:28:33 +00:00
2019-10-13 18:21:19 +00:00
build-node_11:
2018-06-16 17:42:29 +00:00
<<: *common-build
docker:
2019-10-13 18:21:19 +00:00
- image: node:11
2018-06-16 17:42:29 +00:00
2019-10-13 18:21:19 +00:00
build-node_12:
2018-06-16 17:42:29 +00:00
<<: *latest-build
docker:
2019-10-13 18:21:19 +00:00
- image: node:12
2018-06-16 17:42:29 +00:00
2018-05-05 17:48:14 +00:00
deploy:
machine:
enabled: true
working_directory: ~/diff2html
steps:
- attach_workspace:
at: .
- run:
name: Deploy
working_directory: ~/diff2html/docs
2018-11-18 19:07:55 +00:00
command: aws s3 sync . s3://diff2html.xyz --region eu-west-1
2018-05-05 17:48:14 +00:00
2017-10-05 16:28:33 +00:00
workflows:
version: 2
build:
jobs:
- build-node_8
2018-06-16 17:42:29 +00:00
- build-node_10
2019-10-13 18:21:19 +00:00
- build-node_11
- build-node_12
2018-05-05 17:48:14 +00:00
- deploy:
requires:
2019-10-13 18:21:19 +00:00
- build-node_12
2018-05-05 17:48:14 +00:00
filters:
branches:
only: master