From 3978a22b77d9b257b9110322d52c358df37b2628 Mon Sep 17 00:00:00 2001 From: Julien Dudek Date: Mon, 2 Nov 2020 10:54:13 +0100 Subject: [PATCH] feat : etape4 --- .circleci/config.yml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e6dc72..7407ca3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,14 +1,34 @@ version: 2.1 +workflows: + build_and_test: + jobs: + - build + - test: + requires: + - build jobs: build: docker: - - image: "circleci/node:12" # the primary container, where your job's commands are run + - image: "circleci/node:12" steps: - - checkout # check out the code in the project directory + - checkout - restore_cache: - key: yarn-V1-packages-{{ checksum "yarn.lock" }} + key: yarn-packages-{{ checksum "yarn.lock" }} - run: yarn global add node-gyp && yarn install - save_cache: - key: yarn-V1-packages-{{ checksum "yarn.lock" }} + key: yarn-packages-{{ checksum "yarn.lock" }} paths: - - ~/.node_modules + - ./node_modules + test: + docker: + - image: cimg/node:14.10.1 + steps: + - checkout + - restore_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + - run: yarn lint && yarn format:check + - run: yarn test:ci + - save_cache: + key: yarn-packages-{{ checksum "yarn.lock" }} + paths: + - ./node_modules