Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single cache for both pnpm store and Cypress binaries in CI #1319

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

axelboc
Copy link
Contributor

@axelboc axelboc commented Dec 12, 2022

actions/setup-node does not and will not provide a way to pass additional paths to its internal actions/cache instance, so I move caching into a separate step that takes care of caching both the pnpm store and Cypress binaries.

path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
path: |
~/setup-pnpm/node_modules/.bin/store
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path is hardcoded for now, as I don't want to add an extra step just to run pnpm store path. I've suggested storing the path as an output of the pnpm/action-setup step in pnpm/action-setup#68 (comment). To be continued.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it is fine like this, no worries.

.github/workflows/approve-snapshots.yml Show resolved Hide resolved
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
path: |
~/setup-pnpm/node_modules/.bin/store
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it is fine like this, no worries.

@axelboc axelboc merged commit 6be3e79 into main Dec 12, 2022
@axelboc axelboc deleted the cache-job branch December 12, 2022 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants