You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
3.1 KiB
125 lines
3.1 KiB
version: 2.1
|
|
jobs:
|
|
yarninstall:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: henriboulnois
|
|
password: $DOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v2-dependencies
|
|
- run: yarn install
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
yarnlint:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: henriboulnois
|
|
password: $DOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v2-dependencies
|
|
- run: yarn lint
|
|
- run: yarn format:check
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
unittest:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: henriboulnois
|
|
password: $DOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v2-dependencies
|
|
- run: yarn test
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
e2etest:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: henriboulnois
|
|
password: $DOCKERHUB_PASSWORD
|
|
environment:
|
|
DATABASE_URL: postgres://user:user@localhost:5432/psdb
|
|
- image: circleci/postgres:9.6.5-alpine-ram
|
|
auth:
|
|
username: henriboulnois
|
|
password: $DOCKERHUB_PASSWORD
|
|
environment:
|
|
POSTGRES_DB: psdb
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSSWORD: user
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v2-dependencies
|
|
- run: yarn test:e2e
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
docgen:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: henriboulnois
|
|
password: $DOCKERHUB_PASSWORD
|
|
working_directory: /build
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v2-dependencies
|
|
- run: yarn doc:build > /build/doc;
|
|
- save_cache:
|
|
paths:
|
|
- node_modules
|
|
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
|
|
- store_artifacts:
|
|
path: /build/doc
|
|
destination: build
|
|
|
|
workflows:
|
|
build:
|
|
jobs:
|
|
- yarninstall
|
|
- yarnlint:
|
|
requires:
|
|
- yarninstall
|
|
- unittest:
|
|
requires:
|
|
- yarninstall
|
|
- yarnlint
|
|
- e2etest:
|
|
requires:
|
|
- yarninstall
|
|
- yarnlint
|
|
- unittest
|
|
- docgen:
|
|
requires:
|
|
- yarninstall
|
|
- yarnlint
|
|
- unittest
|
|
- e2etest
|