From 5e92de73f8a4f2e744b3091c8d014c3c037f7941 Mon Sep 17 00:00:00 2001 From: shootylife Date: Mon, 2 Nov 2020 11:21:09 +0100 Subject: [PATCH] feat: config.yml --- .circleci/config.yml | 80 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..ab87fcc --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,80 @@ +version: 2.1 +workflows: + version: 2 + build_test: + jobs: + - build + - lint: + requires: + - build + - test: + requires: + - build + - bdd + - test +jobs: + build: + docker: &config + - image: cimg/node:14.10.1 + auth: + username: mydockerhub-user + password: $DOCKERHUB_PASSWORD + steps: + - checkout + - restore_cache: + keys: + - npm-v3-dependencies-{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - save_cache: + key: npm-v3-dependencies-{{ checksum "yarn.lock" }} + paths: + - ./node_modules + lint: + docker: *config + steps: + - checkout + - restore_cache: + keys: + - npm-v3-dependencies-{{ checksum "yarn.lock" }} + - run: yarn lint && yarn format:check + + test: + docker: *config + steps: + - checkout + - restore_cache: + keys: + - npm-v3-dependencies-{{ checksum "yarn.lock" }} + - run: yarn test:ci + + bdd: + docker: *config + environnement: + DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psdb + JWT_SECRET: some string yo want + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + - image: 'circleci/postgres:9.6.2-alpine' + environnement: + POSTGRES_USER: psqluer + POSTGRES_PASSWORD: psqlpassword + POSTREGS_DB: psdb + steps: + - checkout + - restore_cache: + keys: + - npm-v3-dependencies-{{ checksum "yarn.lock" }} + run: yarn test:e2e + + + + + + + + + + + +