Store all deps checksum in a single file
@@ -16,14 +16,15 @@ jobs:
steps:
- checkout
+ # store dependencies information in a single file
+ # so that it can be used with checksum
+ - run: ls -laR backend/requirements
+ - run: ls -laR backend/requirements > backend_deps_checksum
+
# Download and cache dependencies
- restore_cache:
keys:
- - v1-dependencies-{{ checksum "backend/requirements/base.txt" }}
- - v1-dependencies-{{ checksum "backend/requirements/test.txt" }}
- - v1-dependencies-{{ checksum "backend/requirements/prod.txt" }}
- # fallback to using the latest cache if no exact match is found
- - v1-dependencies-
+ - backend-{{ checksum "backend_deps_checksum" }}
- run:
name: install dependencies
@@ -35,9 +36,7 @@ jobs:
- save_cache:
paths:
- ./venv
- key: v1-dependencies-{{ checksum "backend/requirements/base.txt" }}
- key: v1-dependencies-{{ checksum "backend/requirements/test.txt" }}
- key: v1-dependencies-{{ checksum "backend/requirements/prod.txt" }}
+ key: backend-{{ checksum "backend_deps_checksum" }}
- run:
name: run tests
