From d470a4304a0be88a161997ed8b0f9337f67bca9a Mon Sep 17 00:00:00 2001 From: hallouma875 Date: Sat, 27 Mar 2021 14:04:16 +0100 Subject: [PATCH] :construction_worker: add circle ci cache handle config and test job --- .circleci/config.yml | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bd36c6b..4f1aa87 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,43 @@ +executors: + node: + docker: + - image: circleci/node:11.10.1 + +aliases: + restore_cache: &restore_cache + restore_cache: + keys: + - yarn-cache-netlify-{{ checksum "yarn.lock" }} + + install_node_modules: &install_node_modules + run: + command: yarn install + save_cache: &save_cache + save_cache: + key: yarn-cache-netlify-{{ checksum "yarn.lock" }} + paths: + - ./node_modules + version: 2.1 orbs: node: circleci/node@3.0.0 +jobs: + test: + executor: node + steps: + - checkout + - <<: *restore_cache + - <<: *install_node_modules + - <<: *save_cache + - run: + name: Test + command: yarn run test + workflows: - node-tests: + test_build_and_deploy: jobs: - - node/test \ No newline at end of file + - test: + filters: + branches: + ignore: + - gh-pages \ No newline at end of file