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.
 
 
 
 

80 lines
1.6 KiB

version: 2.1
workflows:
version: 2
build_test:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- bdd
- test
jobs:
build:
docker: &config
- image: cimg/node:14.10.1
auth:
username: mydockerhub-user
password: $DOCKERHUB_PASSWORD
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install
- save_cache:
key: npm-v3-dependencies-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check
test:
docker: *config
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:ci
bdd:
docker: *config
environnement:
DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb
JWT_SECRET: some string yo want
API_PORT: 3000
API_HOST: localhost
API_PROTOCOL: http
- image: 'circleci/postgres:9.6.2-alpine'
environnement:
POSTGRES_USER: psqluer
POSTGRES_PASSWORD: psqlpassword
POSTREGS_DB: psdb
steps:
- checkout
- restore_cache:
keys:
- npm-v3-dependencies-{{ checksum "yarn.lock" }}
run: yarn test:e2e