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 - yarn
- e2e-test: - e2e-test:
requires: requires:
- yarn
- lint
- test
jobs: jobs:
yarn: yarn:
docker: docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run: yarn global add node-gyp && yarn install - run: yarn global add node-gyp && yarn install
- save_cache: - save_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
paths: paths:
- ./node_modules - ./node_modules
lint: lint:
docker: docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run: yarn lint - run: yarn lint
- run: yarn format:check - run: yarn format:check
test: test:
docker: docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
key: npm-v1-dependencies-{{ checksum "yarn.lock" }}
key: npm-v2-dependencies-{{ checksum "yarn.lock" }}
- run: yarn test:ci - run: yarn test:ci
e2e-test: e2e-test:
docker: docker:
- image: cimg/node:14.10.1
- image: "circleci/node:12"
environment: 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_PORT: 3000
API_HOST: localhost API_HOST: localhost
API_PROTOCOL: http API_PROTOCOL: http
- image: "circleci/postgres:9.6.2-alpine"
environment:
POSTGRES_USER: jeffyshewan
POSTGRES_DB: testbdd
POSTGRES_PASSWORD: password
steps: steps:
- checkout - checkout
- restore_cache: - 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