Browse Source

🐛 fix for e2e test

main
Jean-François GAUTREAU 6 years ago
parent
commit
c316d03143
  1. 43
      .circleci/config.yml

43
.circleci/config.yml

@ -12,57 +12,74 @@ workflows:
- yarn
- e2e-test:
requires:
- yarn
- lint
- test
jobs:
yarn:
docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install
- save_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
lint:
docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run: yarn lint
- run: yarn format:check
test:
docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
steps:
- checkout
- restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:ci
e2e-test:
docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
environment:
DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb
JWT_SECRET: ARMA, l'eau de combat
DATABASE_URL: postgres://jeffyshewan:password@localhost:5432/testbdd
JWT_SECRET: ARMA_eau_de_combat
API_PORT: 3000
API_HOST: localhost
API_PROTOCOL: http
- image: "circleci/postgres:9.6.2-alpine"
environment:
POSTGRES_USER: jeffyshewan
POSTGRES_DB: testbdd
POSTGRES_PASSWORD: password
steps:
- checkout
- restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run:
name: connecting postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: start e2e test
command: yarn test:e2e
- run: yarn test:e2e
- save_cache:
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
Loading…
Cancel
Save