Yield generated for b3728db8-1184-402e-9983-ac6b092c0e8c
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.
 
 
 
 

85 lines
2.1 KiB

version: 2.1
workflows:
version: 2
devopsTP1:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- bddPostgres:
requires:
- build
- docs:
requires:
- build
- test
- lint
- bddPostgres
jobs:
build:
docker: &config
- image: cimg/node:12.18.4
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- restore_cache:
keys:
- npm-v6-dependencies-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install
- save_cache:
key: npm-v6-dependencies-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v6-dependencies-{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check
test:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v6-dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:ci
bddPostgres:
docker:
- image: cimg/node:12.18.4
environment:
DATABASE_URL: postgres://pasqualini_lucas:pswdevopstpci@localhost:5432/devopstpci
JWT_SECRET: some string
API_HOST: localhost
API_PROTOCOL: http
API_PORT: 3000
- image: circleci/postgres:9.6.2-alpine
environment:
POSTGRES_USER: pasqualini_lucas
POSTGRES_DB: devopstpci
POSTGRES_PASSWORD: pswdevopstpci
steps:
- checkout
- restore_cache:
keys:
- npm-v6-dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:e2e
docs:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v6-dependencies-{{ checksum "yarn.lock" }}
- run: yarn doc:build
- store_artifacts:
path: doc-server
destination: doc-server