Yield generated for 68fa9383-5937-4c98-8211-92908887bad6
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.
 
 
 
 

77 lines
2.3 KiB

version: 2.1
jobs:
build:
docker:
- image: "circleci/node:12" # the primary container, where your job's commands are run
steps:
- checkout # check out the code in the project directory
- restore_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install
- save_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker:
- image: "circleci/node:12" # the primary container, where your job's commands are run
steps:
- checkout # check out the code in the project directory
- restore_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
- run: yarn lint && yarn format:check
- save_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
test:
docker:
- image: "circleci/node:12" # the primary container, where your job's commands are run
steps:
- checkout # check out the code in the project directory
- restore_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
- run: yarn test:ci
- save_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
test_e2e:
docker:
- image: "circleci/node:12" # the primary container, where your job's commands are run
environment:
DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb
JWT_SECRET: answer is 42
API_PORT: 3000
API_HOST: localhost
API_PROTOCOL: http
- image: "circleci/postgres:9.6.2-alpine"
environment:
POSTGRES_USER: psqluer
POSTGRES_DB: psdb
POSTGRES_PASSWORD: psqlpassword
steps:
- checkout # check out the code in the project directory
- restore_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
- run:
command: yarn test:e2e
- save_cache:
key: yarn-v-packages-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
workflows:
build:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build
- test_e2e:
requires:
- build