From 0b07536d041a043e03c8ccfb2a4911f47038c698 Mon Sep 17 00:00:00 2001 From: Morgan <47953421+MorganLmd@users.noreply.github.com> Date: Mon, 2 Nov 2020 11:15:49 +0100 Subject: [PATCH] first try tp step 4 --- .circleci/config.yml | 64 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 98a9f1b..553371e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,26 +1,64 @@ -version: 2.1 +version: 2.1 commands: - restore_cache_cmd: - steps: - - restore_cache: - key: yarn-v1-packages-{{ checksum "yarn.lock" }} - save_cache_cmd: - steps: - - save_cache: - paths: - - ./node_modules - key: yarn-v1-packages-{{ checksum "yarn.lock" }} + restore_cache_cmd: + steps: + - restore_cache: + key: yarn-v1-packages-{{ checksum "yarn.lock" }} + save_cache_cmd: + steps: + - save_cache: + paths: + - ./node_modules + key: yarn-v1-packages-{{ checksum "yarn.lock" }} jobs: - build: + build1: docker: - image: "circleci/node:12" steps: - checkout - restore_cache_cmd - - run: + - run: command: "yarn global add node-gyp && yarn install" name: "installation" - save_cache_cmd + + lint1: + docker: + - image: "circleci/node:12" + + steps: + - checkout + - restore_cache_cmd + - run: + command: "yarn lint && yarn format:check" + name: "lint and format check" + - save_cache_cmd + + unit1: + docker: + - image: "circleci/node:12" + + steps: + - checkout + - restore_cache_cmd + - run: + command: "yarn test:ci" + name: "test unitaires" + - save_cache_cmd + +workflows: + version: 2 + + test_workflow: + jobs: + - build1 + - lint1: + requires: + - build1 + - unit1: + requires: + - build1 + - lint1