From b34887e0f2d7987ff99879049053000c5f3c245a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Sat, 25 Jan 2025 03:58:49 +0100 Subject: [PATCH] CI: invalidate cached dependencies when new versions are released --- .circleci/config.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f68bbf63..8d4d0eab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,9 +66,13 @@ commands: type: string default: package.json steps: + - run: + name: "Check latest versions of dependencies" + command: | + npm outdated --json > "<>/outdated-packages.json" || true - restore_cache: name: "Restoring <> cache" - key: <>-dependency-cache-v5-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<>/<>" }} + key: <>-dependency-cache-v6-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<>/<>" }}-{{ checksum "<>/outdated-packages.json" }} - run: name: "<> install in <>" command: | @@ -83,9 +87,10 @@ commands: fi - save_cache: name: "Saving <> cache" - key: <>-dependency-cache-v5-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<>/<>" }} + key: <>-dependency-cache-v6-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<>/<>" }}-{{ checksum "<>/outdated-packages.json" }} paths: - "<>/node_modules/" + - run: rm "<>/outdated-packages.json" inject-solc-js-tarball: description: "Recursively finds and replaces all instances of solc-js module installed in node_modules/ with the one from a tarball."