From 78e058fd0dc9808ffc15d4299ff8695b69e486ee Mon Sep 17 00:00:00 2001 From: Kira Muhlbauer Date: Fri, 24 Nov 2023 13:50:25 -0700 Subject: [PATCH] cache everything together --- .circleci/config.yml | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 38c965ba..462a9ac8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,29 +4,14 @@ version: 2.1 references: # the key used to pull FRONTEND npm dependencies from the cache - cache-key: &cache-key 'dishzero-{{checksum "package-lock.json"}}' - app-cache-key: &app-cache-key 'dishzero-app-{{checksum "app/package-lock.json"}}' - server-cache-key: &server-cache-key 'dishzero-server-{{checksum "backend/package-lock.json"}}' + cache-key: &cache-key 'dishzero-npm-{{checksum "package-lock.json"}}-{{checksum "app/package-lock.json"}}' commands: - restore-app: - steps: - - restore_cache: - key: *app-cache-key - -# restore-server: -# steps: -# - restore_cache: -# key: *server-cache-key - restore-all: steps: - restore_cache: key: *cache-key - - restore_cache: - key: *app-cache-key -# - restore_cache: -# key: *server-cache-key + executors: ci-node: @@ -47,31 +32,20 @@ jobs: - run: name: "Install base dependencies" command: npm install --include dev - - save_cache: - paths: - - node_modules - key: *cache-key - run: name: "Install frontend dependencies" command: cd app && npm install --include dev - save_cache: - paths: - - app/node_modules - key: *app-cache-key -# - run: -# name: "Install server dependencies" -# command: cd backend && npm install --include dev -# - save_cache: -# paths: -# - backend/node_modules -# key: *server-cache-key + paths: ["node_modules", "app/node_modules"] + key: *cache-key + # run eslint on frontend lint-app: executor: ci-node steps: - checkout - - restore-app + - restore-all - run: name: "Lint /app" command: cd app && npm run lint-ci