Yield generated for 37c48941-efda-4994-80e7-e3f01a976e02
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.
 
 

90 lines
2.0 KiB

version: 2.1
jobs:
build:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
steps:
- checkout
- run:
name: "Hello World"
command: echo "Hello World"
- restore_cache:
keys:
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
- npm-v2-dependencies-
- run:
name: "yarn install"
command: yarn install
- save_cache:
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
paths:
- node_modules
lint:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
steps:
- checkout
- restore_cache:
keys:
- npm-v2-dependencies-{{ checksum "yarn.lock" }}
- npm-v2-dependencies-
- run:
name: "lint step"
command: |
yarn lint
yarn format:check
- run:
name: "yarn test"
command: yarn test
postgres:
docker:
- image: circleci/postgres:9.6.2-alpine
auth:
username: adechauveron
password: $DOCKER_PASSWORD
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
steps:
- checkout
end_to_end_tests:
docker:
- image: cimg/node:16.10.0
auth:
username: adechauveron
password: $DOCKER_PASSWORD
steps:
- checkout
- run:
name: "yarn test"
command: yarn test:e2e
environment:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
workflows:
version: 2
build_and_test:
jobs:
- build
- lint:
requires:
- build
- postgres:
requires:
- build
- end_to_end_tests:
requires:
- lint
- postgres