From 4a359fb7a656220e5e591f158140e5eada5c9082 Mon Sep 17 00:00:00 2001 From: LecomteAdrien Date: Mon, 2 Nov 2020 11:48:58 +0100 Subject: [PATCH] Update config.yml --- .circleci/config.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0d8f75..6fe1c8e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,9 @@ workflows: - tests: requires: - build + - database: + require: + - build jobs: build: docker: @@ -43,6 +46,29 @@ jobs: - restore_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} - run: yarn lint && yarn format:check + - save_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + paths: + - ./node_modules + + database: + - image: circleci/postgres:9.6-alpine + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD # context / project UI env-var reference + environment: + POSTGRES_USER: psqluer + POSTGRES_DB: psdb + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: + - checkout + - restore_cache: + key: yarn-packages-v3{{ checksum "yarn.lock" }} + - run: yarn test:e2e - save_cache: key: yarn-packages-v3{{ checksum "yarn.lock" }} paths: