Yield generated for f2c46617-1c7e-4528-98b2-e7c7fccbfd11
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.
 
 

67 lines
1.4 KiB

globals:
images:
node: &node cimg/node:lts
postgres: &postgres circleci/postgres:9.6.5
caches:
version: 2
jobs:
build: &shared-config
docker:
- image: *node
working_directory: ~/app
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: dependencies-{{ checksum "package.json" }}
test:
<<: *shared-config
steps:
- checkout
- restore_cache:
key: dependencies-{{ checksum "package.json" }}
- run: yarn test
test-e2e:
<<: *shared-config
docker:
- image: *node
- image: *postgres
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- checkout
- restore_cache:
keys:
- dependencies-{{ checksum "package.json" }}
- run:
command: yarn test:e2e
environment:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
workflows:
version: 2
build-test-and-lint:
jobs:
- build
- test:
requires:
- build
- test-e2e:
requires:
- build