Skip to content

Commit

Permalink
ci: hash all package.json files for dep caching (#1414)
Browse files Browse the repository at this point in the history
  • Loading branch information
samestep committed May 21, 2023
1 parent 966d2a2 commit 099fca1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
11 changes: 5 additions & 6 deletions .github/actions/setup/action.yml
Expand Up @@ -25,12 +25,11 @@ runs:
node_modules
packages/*/node_modules
# obviously we need to hash `yarn.lock` because that specifies all our
# external dependencies, but we also need to hash `package.json` because
# Yarn creates symlinks under `node_modules/@penrose/` for each of our
# packages, so we need to update those if any packages are added; note
# that this strategy means we cannot use wildcards in the `"packages"`
# list in `package.json`, and must instead list them all explicitly
key: ${{ runner.os }}-${{ hashFiles('package.json', 'yarn.lock') }}
# external dependencies, but we also need to hash all of our
# `package.json` files because Yarn creates symlinks under
# `node_modules/@penrose/` for each of our packages, so we need to
# update those if any packages are added
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
- if: steps.cache.outputs.cache-hit != 'true'
name: Install packages
run: yarn
Expand Down
10 changes: 1 addition & 9 deletions package.json
Expand Up @@ -40,15 +40,7 @@
},
"workspaces": {
"packages": [
"packages/components",
"packages/core",
"packages/docs-site",
"packages/edgeworth",
"packages/editor",
"packages/examples",
"packages/optimizer",
"packages/roger",
"packages/vscode"
"packages/*"
],
"nohoist": [
"**/@types/jest",
Expand Down

0 comments on commit 099fca1

Please sign in to comment.