From dedd69e9ee5c470bfdf6d24d8af95b01c7bdaf52 Mon Sep 17 00:00:00 2001 From: NicolasLepinette <55684429+NicolasLepinette@users.noreply.github.com> Date: Thu, 5 Nov 2020 19:11:51 +0100 Subject: [PATCH] Update config.yml --- .circleci/config.yml | 52 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6684f84..5071c4d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,34 @@ workflows: + install: + jobs: + - yarn + - lint: + requires: + - yarn + tests: + jobs: + - bdd jobs: - build: + yarn: docker: - - image: cimg/node:14.10.1 # the primary container, where your job's commands are run + - image: 'circleci/node:12' steps: - checkout - restore_cache: key: yarn-packages-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp - run: yarn install + - save_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ./node_modules + lint: + docker: + - image: 'circleci/node:12' + steps: + - checkout + - restore_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} - run: yarn lint - run: yarn format:check - run: yarn test:ci @@ -16,3 +36,31 @@ jobs: key: yarn-packages-{{ checksum "yarn.lock" }} paths: - ./node_modules + bdd: + docker: + - image: 'circleci/node:12' + environment: + DATABASE_URL: postgres://psqluser:psqlpassword@localhost:5432/psdb + JWT_SECRET: bla bla + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + - image: 'circleci/postgres:9.6.2-alpine' + environment: + POSTGRES_USER: psqluser + POSTGRES_PASSWORD: psqlpassword + POSTGRES_DB: psdb + + steps: + - checkout + - restore_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + - run: yarn test:e2e + - save_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ./node_modules + + + +