-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
build(ci): Use cache in GitHub Actions #4671
Conversation
Should we remove CI running triggered by |
I think this happens only when a PR is opened from Scoop core itself. If someone from outside forks and sends a PR it will run twice. |
I mean, since a PR is required, is it needed for other pushed branches to pass CI test? This test should be run only when a PR is submitted. |
Hmm, yeah, makes sense |
8ac66b0
to
362bf2d
Compare
Will it be possible to cache stuff for other workflows too, like pull request/issue handler, hash fix/404 error handler, |
Caching scoop is not preferred since we need CI to test modified scoop code. For decompressing tools, current CI won't fetch them until needed, see Lines 30 to 33 in 5f407ca
Lines 42 to 45 in 5f407ca
If |
Why would this be required for issues/PR handlers? |
You mean tests in bucket repo? Yes, scoop code should be cached there, and a proper hash should be found to make sure it is in |
Yes, I meant for the buckets itself |
I'll take some time to check the probability. It should be cacheable, IMO. |
Description
Use
https://github.com/actions/cachehttps://github.com/potatoqualitee/psmodulecache to cache PowerShell modules in GitHub Actions. (Really not happy while working with https://github.com/actions/cache)Motivation and Context
PowerShell modules installation is the most time-consuming step of CI test, this fix tries to skip them.
It also skips modules installation if there're ones.
How Has This Been Tested?
I don't find an effective way to test the PR, but it seems to workFrom CI results below, it found cache, but doesn't use them. Maybe a little more tweak are needed.Use https://github.com/potatoqualitee/psmodulecache to cache PowerShell Modules, it works fine as this PR's two commits.
Checklist:
I have updated the tests accordingly.