|
|
|
@ -8,7 +8,10 @@ workflow: |
|
|
|
- build |
|
|
|
test: |
|
|
|
requires: |
|
|
|
-build |
|
|
|
- build |
|
|
|
e2e: |
|
|
|
requires: |
|
|
|
- build |
|
|
|
jobs: |
|
|
|
build: |
|
|
|
docker: |
|
|
|
@ -38,3 +41,27 @@ jobs: |
|
|
|
- restore_cache: |
|
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }} |
|
|
|
- run: yarn test:ci |
|
|
|
e2e: |
|
|
|
docker: |
|
|
|
- image: cimg/node:14.10.1 |
|
|
|
environment: |
|
|
|
DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb |
|
|
|
JWT_SECRET: keke |
|
|
|
API_PORT: 3000 |
|
|
|
API_HOST: localhost |
|
|
|
API_PROTOCOL: http |
|
|
|
-image: circleci/postgres:9.6.2-alpine |
|
|
|
environment: |
|
|
|
POSTGRE_USER: keke |
|
|
|
POSTGRE_DB: mydb |
|
|
|
POSTGRE_PASSWORD:keke |
|
|
|
steps: |
|
|
|
- checkout |
|
|
|
- restore_cache: |
|
|
|
key: npm-v1-dependencies-{{ checksum "yarn.lock" }} |
|
|
|
- run: |
|
|
|
name: time to launch |
|
|
|
command: dockerize wait tcp://localhost:5432 -timeout 1m |
|
|
|
- run: |
|
|
|
name: e2e test |
|
|
|
command: yarn test:e2e |