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
ci/rubyonrails.yml bug #2159
Comments
ran into this issue. tx you for raising it. looking forward the PR :) |
I'd be happy to write a PR, if a project maintainer posts on this issue to say it might be worth submitting. |
This issue has become stale and will be closed automatically within a period of time. Sorry about that. |
Oops — I had forgotten about this issue until the bot reminded me! Since the only feedback I got was thumbs-ups, and suggesting I submit a PR, I went ahead and submitted #2302. |
Issue
I believe there's a bug in
ci/rubyonrails.yml
.In lines 48-54, the lint job sets up ruby with
ruby/setup-ruby
andbundler-cache: true
. The next step attempts to runbin/bundler-audit
.In a stock configuration the working directory is
/home/runner/work/REPO_NAME/REPO_NAME
and there's nobin
subdirectory. That always fails. (For the audit and for the other two CI steps as well.)The
bundler-audit
binary is installed in/home/runner/work/REPO_NAME/REPO_NAME/vendor/bundle/ruby/RUBY_VERSION/bin/
, and unless commands are run withbundle exec
, that directory isn't in the$PATH
.The fix I would suggest is
bundle exec
as a prefix (and not specifying thebin/
directory, that's inappropriate).Other changes I would suggest:
bundle-audit
, notbundler-audit
, as suggested in its readmeruby/setup-ruby
at versionv1
, not pinned to a hash, as preferred in its readmeI'm happy to submit a PR for 1, 2, and/or 3. Just let me know which you'd like to see.
Proof-of-concept for fix 1
As a proof-of-concept I created a minimal repository where CI fails, here:
https://github.com/jamiemccarthy/setup-ruby-test
The CI fails with:
and the
bundle exec
one-line fix makes the CI pass, here:jamiemccarthy/setup-ruby-test#1
The text was updated successfully, but these errors were encountered: