Skip to content

Commit

Permalink
CI: invalidate cached dependencies when new versions are released
Browse files Browse the repository at this point in the history
  • Loading branch information
cameel committed Jan 25, 2025
1 parent 5b5f32c commit 3dc9ac8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@ commands:
type: string
default: package.json
steps:
- run:
name: "Check latest versions of dependencies"
command: |
npm outdated --json > "<<parameters.path>>/outdated-packages.json"
- restore_cache:
name: "Restoring <<parameters.cache-id>> cache"
key: <<parameters.cache-id>>-dependency-cache-v5-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<<parameters.path>>/<<parameters.dependency-file>>" }}
key: <<parameters.cache-id>>-dependency-cache-v5-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<<parameters.path>>/<<parameters.dependency-file>>" }}-{{ checksum "<<parameters.path>>/outdated-packages.json" }}
- run:
name: "<<parameters.package-manager>> install in <<parameters.path>>"
command: |
Expand All @@ -95,6 +99,7 @@ commands:
key: <<parameters.cache-id>>-dependency-cache-v5-{{ .Environment.CIRCLE_JOB }}-{{ checksum "<<parameters.path>>/<<parameters.dependency-file>>" }}
paths:
- "<<parameters.path>>/node_modules/"
- run: rm "<<parameters.path>>/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."
Expand Down

0 comments on commit 3dc9ac8

Please sign in to comment.