From 9a16f529ed6f474404e8bbb7c30b79a4c7df89df Mon Sep 17 00:00:00 2001 From: ndrg13 <72130242+ndrg13@users.noreply.github.com> Date: Thu, 5 Nov 2020 18:58:43 +0100 Subject: [PATCH] Update config.yml --- .circleci/config.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 210752a..c3ac2d4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,8 +6,12 @@ executors: auth: username: $DOCKERHUB_LOGIN password: $DOCKERHUB_PASSWORD - postgresql-executor: + node-and-postgresql-executor: docker: + - image: circleci/node:12 + auth: + username: $DOCKERHUB_LOGIN + password: $DOCKERHUB_PASSWORD - image: circleci/postgres auth: username: $DOCKERHUB_LOGIN @@ -45,6 +49,24 @@ jobs: - run: name: Run test with jest command: yarn test:ci + test_end_to_end: + executor: node-and-postgresql-executor + environment: + DATABASE_URL: "postgres://e2e:test@localhost:5432/psdb" + JWT_SECRET: + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + steps: + - checkout + - restore_cache: + name: Restore yarn package cache + key: npm-v7-dependencies-{{ checksum "yarn.lock" }} + - run: + name: Run end to end test + command: yarn test:e2e + + workflows: version: 2 integration: @@ -56,3 +78,6 @@ workflows: - test: requires: - build + - test_end_to_end: + requires: + - build