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

Enable npm cache on setup-node action #30577

Merged
merged 2 commits into from
Apr 19, 2024
Merged

Conversation

silverwind
Copy link
Member

Enable npm dependency cache in setup-node. This should work reliably and across branches as well.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 18, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 18, 2024
@silverwind silverwind changed the title Enable cache on setup-node Enable cache on setup-node action Apr 18, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 18, 2024
@silverwind silverwind changed the title Enable cache on setup-node action Enable npm cache on setup-node action Apr 19, 2024
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 19, 2024
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 19, 2024
@lunny lunny enabled auto-merge (squash) April 19, 2024 02:57
@lunny lunny added backport/v1.21 This PR should be backported to Gitea 1.21 backport/v1.22 This PR should be backported to Gitea 1.22 labels Apr 19, 2024
@lunny lunny merged commit acfe29f into go-gitea:main Apr 19, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Apr 19, 2024
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.21. @silverwind, please send one manually. 🍵

go run ./contrib/backport 30577
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Apr 19, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Apr 19, 2024
Enable npm dependency cache in
[setup-node](https://github.com/actions/setup-node). This should work
reliably and across branches as well.
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 19, 2024
lunny pushed a commit to lunny/gitea that referenced this pull request Apr 19, 2024
Enable npm dependency cache in
[setup-node](https://github.com/actions/setup-node). This should work
reliably and across branches as well.
@lunny lunny added the backport/done All backports for this PR have been created label Apr 19, 2024
@silverwind silverwind deleted the npmcache branch April 19, 2024 07:15
silverwind added a commit that referenced this pull request Apr 19, 2024
Backport #30577 by @silverwind

Enable npm dependency cache in
[setup-node](https://github.com/actions/setup-node). This should work
reliably and across branches as well.

Co-authored-by: silverwind <[email protected]>
@silverwind
Copy link
Member Author

silverwind commented Apr 19, 2024

Appears to work, my only concern is that architecture is not part of the cache filename, so it likely wouldn't work on a ARM runner.

Cache Size: ~85 MB (89250540 B)
/usr/bin/tar -xf /home/runner/work/_temp/ae0c5c73-d834-49be-b978-c98505ba4006/cache.tzst -P -C /home/runner/work/gitea/gitea --use-compress-program unzstd
Received 89250540 of 89250540 (100.0%), 85.0 MBs/sec
Cache restored successfully
Cache restored from key: node-cache-Linux-npm-bb14c5c36cd9cd442e9396c6ec686de115833ea7f9aee296b2f75f72b2e16d5d

@silverwind
Copy link
Member Author

Cache restored from key: node-cache-Linux-npm-bb14c5c36cd9cd442e9396c6ec686de115833ea7f9aee296b2f75f72b2e16d5d

I filed actions/setup-node#1008 for this.

zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 19, 2024
* giteaofficial/main:
  Fix project description rendering for org (go-gitea#30587)
  Fix changelog (main) (go-gitea#30582)
  Avoid importing `modules/web/middleware` in `modules/session` (go-gitea#30584)
  Enable npm cache on `setup-node` action (go-gitea#30577)
lunny added a commit that referenced this pull request Apr 22, 2024
Backport #30577 

Enable npm dependency cache in
[setup-node](https://github.com/actions/setup-node). This should work
reliably and across branches as well.

---------

Co-authored-by: silverwind <[email protected]>
@wxiaoguang wxiaoguang added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Apr 27, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.21 This PR should be backported to Gitea 1.21 backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/internal size/S Denotes a PR that changes 10-29 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants