From 0da7121fd0e3f9428f9bb4cdbefd8d6eff48606b Mon Sep 17 00:00:00 2001 From: Louis Dutoit Date: Tue, 3 Nov 2020 15:38:28 +0100 Subject: [PATCH] add cache --- .circleci/config.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 16289b0..f673b74 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,12 +12,15 @@ jobs: - restore_cache : keys : - npm-v1-dependencies-{{ checksum "yarn.lock" }} + - save_cache: + paths: + - ./node_modules + key: npm-v1-dependencies-{{ checksum "yarn.lock" }} lint: docker: *shared_docker steps: - - checkout # check out the code in the project directory - - run: yarn global add node-gyp && yarn install + - checkout # check out the code in the project director - restore_cache : keys : - npm-v1-dependencies-{{ checksum "yarn.lock" }} @@ -27,8 +30,7 @@ jobs: test: docker: *shared_docker steps: - - checkout # check out the code in the project directory - - run: yarn global add node-gyp && yarn install + - checkout # check out the code in the project director - restore_cache : keys : - npm-v1-dependencies-{{ checksum "yarn.lock" }} @@ -51,7 +53,6 @@ jobs: POSTGRES_PASSWORD: password steps: - checkout - - run: yarn global add node-gyp && yarn install - restore_cache: keys: - npm-v1-dependencies-{{ checksum "yarn.lock" }} @@ -63,6 +64,12 @@ workflows: build_test: jobs : - build - - lint - - test - - e2etest \ No newline at end of file + - lint: + requires: + - build + - test: + requires: + - build + - e2etest: + requires: + - build \ No newline at end of file