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.
136 lines
3.3 KiB
136 lines
3.3 KiB
version: 2.1
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: adrienba
|
|
password: $MYDOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-dependencies
|
|
- run:
|
|
name: "yarn install"
|
|
command: yarn install
|
|
- save_cache:
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- node_modules
|
|
yarnlint:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: adrienba
|
|
password: $MYDOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-dependencies
|
|
- run:
|
|
name: "yarn lint"
|
|
command: yarn lint
|
|
- run:
|
|
name: "yarn format:check"
|
|
command: yarn format:check
|
|
- save_cache:
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- node_modules
|
|
yarntest:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: adrienba
|
|
password: $MYDOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-dependencies
|
|
- run:
|
|
name: "yarn test"
|
|
command: yarn test
|
|
- save_cache:
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- node_modules
|
|
bddtest:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: adrienba
|
|
password: $MYDOCKERHUB_PASSWORD
|
|
environment:
|
|
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
|
|
- image: circleci/postgres:9.6.5-alpine-ram
|
|
auth:
|
|
username: adrienba
|
|
password: $DOCKERHUB_PASSWORD
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_DB: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-dependencies
|
|
- run:
|
|
name: "yarn test:e2e"
|
|
command: yarn test:e2e
|
|
- save_cache:
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- node_modules
|
|
generatedoc:
|
|
docker:
|
|
- image: cimg/node:lts
|
|
auth:
|
|
username: adrienba
|
|
password: $MYDOCKERHUB_PASSWORD
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
- npm-v1-dependencies
|
|
- run:
|
|
name: "yarn doc:build"
|
|
command: yarn doc:build
|
|
- save_cache:
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
|
|
paths:
|
|
- node_modules
|
|
- store_artifacts:
|
|
path: docs
|
|
destination: documentation
|
|
|
|
|
|
|
|
|
|
|
|
workflows:
|
|
build-test-and-deploy:
|
|
jobs:
|
|
- build
|
|
- yarnlint:
|
|
requires:
|
|
- build
|
|
- yarntest:
|
|
requires:
|
|
- yarnlint
|
|
- bddtest:
|
|
requires:
|
|
- build
|
|
- generatedoc:
|
|
requires:
|
|
- yarntest
|
|
- bddtest
|