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 cache built into ruby/setup-ruby action #1671

Merged
merged 3 commits into from
Jan 11, 2023

Conversation

ashmaroli
Copy link
Contributor

The ruby/setup-ruby GitHub Action has a provision for caching installed bundle. Using that cache is better than handling it locally.

@ashmaroli
Copy link
Contributor Author

/cc @dylanahsmith

@@ -1,39 +1,36 @@
name: Liquid
on: [push, pull_request]

env:
BUNDLE_PATH: "vendor/bundle"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this environment variable be removed? Since https://github.com/ruby/setup-ruby#bundle-config says

To perform caching, this action will use bundle config --local path $PWD/vendor/bundle.
Therefore, the Bundler path should not be changed in your workflow for the cache to work (no bundle config path).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I'll remove it.
Although, it being set to vendor/bundle doesn't affect the caching. (Can be observed via the log report for Ruby 2.7 against the second commit).

Copy link
Contributor

@dylanahsmith dylanahsmith left a comment

Choose a reason for hiding this comment

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

Thanks for the improvement

@dylanahsmith dylanahsmith merged commit e8731f2 into Shopify:master Jan 11, 2023
@ashmaroli ashmaroli deleted the use-builtin-bundle-cache branch January 11, 2023 16:42
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