From cf412349e304dc731d3248fffd5ac662a4bee276 Mon Sep 17 00:00:00 2001 From: abouhanifa Date: Thu, 5 Nov 2020 20:35:03 +0100 Subject: [PATCH] last commit --- circleci/config.yml | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 circleci/config.yml diff --git a/circleci/config.yml b/circleci/config.yml new file mode 100644 index 0000000..8dd5a2b --- /dev/null +++ b/circleci/config.yml @@ -0,0 +1,90 @@ +version: 2.1 +jobs: + build: + docker: + - image: "circleci/node:12" + steps: + - checkout + - restore_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + - run: yarn global add node-gyp && yarn install + - save_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + paths: + - ./node_modules + tests: + docker: + - image: "circleci/node:12" + steps: + - checkout + - restore_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + - run: yarn test:ci + - save_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + paths: + - ./node_modules + lint: + docker: + - image: "circleci/node:12" + steps: + - checkout + - restore_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + - run: yarn lint && yarn format:check + - save_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + paths: + - ./node_modules + e2e: + docker: + - image: "circleci/node:12" + - image: "circleci/postgres:9.6.2-alpine" + environment: + POSTGRES_USER: abdallah_2020 + POSTGRES_DB: testci + POSTGRES_PASSWORD: password + steps: + - checkout + - restore_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + - run: + command: yarn test:e2e + environment: + DATABASE_URL: postgres://julien_dudek:unpass@localhost:5432/testdb + JWT_SECRET: m1iii + API_PORT: 3000 + API_HOST: localhost + API_PROTOCOL: http + - save_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + paths: + - ./node_modules + doc: + docker: + - image: "circleci/node:12" + steps: + - checkout + - restore_cache: + key: yarn-cache{{ checksum "yarn.lock" }} + - run: + command: yarn doc:build + - store_artifacts: + path: ./doc-server + +workflows: + build_and_test: + jobs: + - build + - lint: + requires: + - build + - tests: + requires: + - build + - e2e: + requires: + - build + - doc: + requires: + - build