2018-01-05 18:45:55 +01:00
|
|
|
version: 2
|
2018-01-19 16:06:23 +01:00
|
|
|
templates:
|
|
|
|
steps: &steps
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: "Create artifacts directory"
|
|
|
|
command: mkdir /tmp/artifacts
|
|
|
|
- restore_cache:
|
|
|
|
key: v1-dependencies-{{ checksum "package.json" }}
|
|
|
|
|
|
|
|
- run: npm install
|
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- node_modules
|
|
|
|
key: v1-dependencies-{{ checksum "package.json" }}
|
|
|
|
|
|
|
|
- run: mkdir -p /tmp/artifacts/logs
|
|
|
|
- run: npm run build
|
|
|
|
- run: npm run lint
|
|
|
|
- run: npm run lint-styles
|
|
|
|
- run: DOCKER_HOST=localhost npm test
|
|
|
|
- run: ./node_modules/.bin/istanbul report --include /tmp/artifacts/coverage/coverage.json --dir /tmp/artifacts/coverage html lcov
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/artifacts
|
|
|
|
destination: /artifacts
|
2018-01-05 18:45:55 +01:00
|
|
|
jobs:
|
2018-01-19 16:13:46 +01:00
|
|
|
build-linux-node-v6:
|
|
|
|
docker:
|
|
|
|
# specify the version you desire here
|
|
|
|
- image: node:6
|
|
|
|
- image: selenium/standalone-chrome:3.1.0
|
2018-01-19 18:14:56 +01:00
|
|
|
working_directory: ~/repo-linux-node-v6
|
2018-01-19 16:13:46 +01:00
|
|
|
steps: *steps
|
2018-01-19 16:06:23 +01:00
|
|
|
build-linux-node-v8:
|
2018-01-05 18:45:55 +01:00
|
|
|
docker:
|
|
|
|
# specify the version you desire here
|
|
|
|
- image: node:8
|
|
|
|
- image: selenium/standalone-chrome:3.1.0
|
2018-01-19 18:14:56 +01:00
|
|
|
working_directory: ~/repo-linux-node-v8
|
2018-01-19 16:06:23 +01:00
|
|
|
steps: *steps
|
2018-01-19 16:13:46 +01:00
|
|
|
build-linux-node-v9:
|
|
|
|
docker:
|
|
|
|
# specify the version you desire here
|
|
|
|
- image: node:9
|
|
|
|
- image: selenium/standalone-chrome:3.1.0
|
2018-01-19 18:14:56 +01:00
|
|
|
working_directory: ~/repo-linux-node-v9
|
2018-01-19 16:13:46 +01:00
|
|
|
steps: *steps
|
2018-01-19 16:08:45 +01:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build:
|
|
|
|
jobs:
|
2018-01-19 16:13:46 +01:00
|
|
|
- build-linux-node-v6
|
2018-01-19 16:08:45 +01:00
|
|
|
- build-linux-node-v8
|
2018-01-19 16:13:46 +01:00
|
|
|
- build-linux-node-v9
|
|
|
|
|