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