Skip to content

Commit

Permalink
dependency headaches
Browse files Browse the repository at this point in the history
  • Loading branch information
kira-m committed Nov 24, 2023
1 parent e43048b commit d6e9e27
Showing 1 changed file with 24 additions and 14 deletions.
38 changes: 24 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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"}}'

Expand All @@ -13,17 +14,19 @@ commands:
- restore_cache:
key: *app-cache-key

restore-server:
steps:
- restore_cache:
key: *server-cache-key
# restore-server:
# steps:
# - restore_cache:
# key: *server-cache-key

restore-all:
steps:
- restore_cache:
key: *app-cache-key
key: *cache-key
- restore_cache:
key: *server-cache-key
key: *app-cache-key
# - restore_cache:
# key: *server-cache-key

executors:
ci-node:
Expand All @@ -41,20 +44,27 @@ jobs:
steps:
- checkout
- restore-all
- 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
# - run:
# name: "Install server dependencies"
# command: cd backend && npm install --include dev
# - save_cache:
# paths:
# - backend/node_modules
# key: *server-cache-key

# run eslint on frontend
lint-app:
Expand All @@ -70,7 +80,7 @@ jobs:
executor: ci-node
steps:
- checkout
- restore-app
- restore-all
- run:
environment:
JEST_JUNIT_OUTPUT_DIR: ./test-results/
Expand Down

0 comments on commit d6e9e27

Please sign in to comment.