-
Notifications
You must be signed in to change notification settings - Fork 71
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
fix: resolve tar issues by updating to official @actions/cache #37
Conversation
- reproduces tar error in the examples when running `./` action on Windows and macOS - this should help find OS issues in the future like the tar one that was exclusive to macOS and Windows - unfortunately, can't be added as a test to the unit tests because they stub out the cache
- was previously using a branch of a forked version since the official action was not published as a package and didn't export its internal functions (only ran them) - that version has bugs with using `tar` on Windows and macOS, making this action fail for matrix tests on various OSes - now the official version is published at: https://github.com/actions/toolkit/blob/master/packages/cache - and its tar handling has changed quite a bit since: https://github.com/actions/toolkit/blob/0bf9897205aa22619fd765a7f927983aae8f3d82/packages/cache/src/internal/tar.ts - update usage and tests to new API that requires an array for inputPaths and restoreKeys
@bahmutov could you review this? |
@bahmutov following up again... |
@bahmutov following up one more time... Been over 3 weeks without a response 😕 I didn't want to keep a fork but sounds like I'll have to... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it, can you address the tiny question about the version and I will be happy to merge
@agilgur5 would you like to help me maintain this package since I have my hands full with work, and you know what you are doing |
🎉 This PR is included in version 1.4.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@bahmutov yea I can try my best and given I was thinking of forking as this is a useful action to DRY up code and decrease cache mistakes anyway, that would make sense. That being said, I too have well over a full plate of work at my job, and am quite behind on OSS projects I already maintain, so can't say I'll have too much time to add or that this project would be top priority. But this doesn't get many issues either. Also while the source code is pretty straightforward, I don't fully understand how the tests are organized right now, seemed a bit duplicative when I was making these changes. |
Description
Commits
ci: add OS matrix to ensure compatibility
reproduces tar error in the examples when running
./
action onWindows and macOS
this should help find OS issues in the future like the tar one that
was exclusive to macOS and Windows
unfortunately, can't be added as a test to the unit tests because
they stub out the cache
fix: resolve tar issues by updating to official @actions/cache
was previously using a branch of a forked version since the official
action was not published as a package and didn't export its
internal functions (only ran them)
tar
on Windows and macOS, makingthis action fail for matrix tests on various OSes
update usage and tests to new API that requires an array for
inputPaths and restoreKeys
Tags
Fixes #24
Fixes downstream jaredpalmer/tsdx#625 (comment)
EDIT: Also fixes #8 and closes #27 per #27 (comment)
API Differences
Can see how the
@actions/cache
API looks like with arrays:restoreCache
saveCache
Testing
Per commit messages, the unit tests can't detect this as they stub out
@actions/cache
.But running the
example-subfolders
workflow acts as a kind of e2e test and will show errors as it's the only workflow that runs itself via./
instead ofbahmutov/npm-install@HEAD
, so I added the OS matrix there.Screenshot differences in CI
These are all screenshots taken from my fork on the
example-subfolders
workflow.Before on Windows:
Before on macOS:
After on Windows:
After on macOS: