From 35a0406cd4a62504be3247712a9b8c5c230afb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anthony=20Qu=C3=A9r=C3=A9?= <47711333+Anthony-Jhoiro@users.noreply.github.com> Date: Mon, 11 Oct 2021 10:25:35 +0200 Subject: [PATCH] Updated config.yml --- .circleci/config.yml | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 18faf0b..4f6d351 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,4 @@ -version: 2.1 - - +version: 2.1 jobs: install: docker: @@ -8,8 +6,6 @@ jobs: auth: username: anthonyjhoiro password: $DOCKERHUB_PASSWORD - - steps: - checkout - restore_cache: @@ -24,8 +20,43 @@ jobs: key: npm-v1-dependencies-{{ checksum "yarn.lock" }} paths: - node_modules + + lint: + docker: + - image: cimg/node:16.10.0 + auth: + username: anthonyjhoiro + password: $DOCKERHUB_PASSWORD + steps: + - restore_cache: + keys: + - npm-v1-lint-{{ checksum "yarn.lock" }} + - run: + name: Check files format + command: yarn format:check + + - run: + name: Lint files + command: yarn lint + + - save_cache: + name: Save linted files + key: npm-v1-lint-{{ checksum "yarn.lock" }} + paths: + - src + test-ci: + docker: + - image: cimg/node:16.10.0 + auth: + username: anthonyjhoiro + password: $DOCKERHUB_PASSWORD + steps: + - run: + name: Unit Tests + command: yarn test:ci workflows: build-workflow: jobs: - install + - lint