-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Move MRI build to Github Actions #2404
Conversation
e6bfef7
to
e64e5af
Compare
jruby not moved because there is too many issues with it at the moment. Next step fix : - fix ruby 3 - fix flacky test with "mountable_engine?" error - add JRuby
8f47c5e
to
fb018f1
Compare
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.
Wonderful! Thanks!
PS mountable_engine?
strikes back. Unrelated, it was the case for long.
Ok. For the flaky test. I nearly find it. If you have this # spec/generators/rspec/scaffold/scaffold_generator_spec.rb
# Generators are not automatically loaded by Rails
require 'generators/rspec/scaffold/scaffold_generator'
require 'support/generators'
RSpec.describe Rspec::Generators::ScaffoldGenerator, type: :generator do
setup_default_destination
describe 'standard request specs' do
subject { file('spec/requests/posts_spec.rb') }
describe 'with --no-request_specs' do
before { run_generator %w[posts --no-request_specs] }
it { is_expected.not_to exist }
end
describe 'in an engine' do
before do
allow_any_instance_of(::Rails::Generators::NamedBase).to receive(:mountable_engine?).and_return(true)
run_generator %w[posts --request_specs]
end
it do
is_expected.to contain('Engine.routes.url_helpers')
end
end
end
end
It seems the stub is leaking to other test. We are not able to reset properly to the right state after the engine test pass. It's very late here. So maybe tomorrow I will try to keep digging, but if you have an idea... Maybe it is related to ammeter? |
5d2c5ed
to
de824c2
Compare
de824c2
to
1d12c96
Compare
allow_any_instance_of(::Rails::Generators::NamedBase).to receive(:mountable_engine?).and_return(true) | ||
run_generator %w[posts --request_specs] | ||
it 'generates files with Engine url_helpers' do | ||
in_sub_process do |
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.
👏
Wondering why it was wiping out the original method along the way.
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 don't know 🤔
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 suspect, and this is just a theory on my part, because when it stubs the method doesn't exist, it's then loaded, and the then stub blows it away as it was never there originally.
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.
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.
🤯 😱
Reminds me of #2394 (comment)
Error was + 1) InboxMailbox route email to properly mailbox + Failure/Error: + expect(InboxMailbox) + .to receive_inbound_email(to: "replies@example.com") + + ArgumentError: + wrong number of arguments (given 1, expected 0) + # /home/runner/work/rspec-rails/bundle/ruby/3.0.0/gems/actionmailbox-6.0.3.4/lib/action_mailbox/test_helper.rb:16:in `create_inbound_email_from_mail' + # ./spec/mailboxes/inbox_mailbox_spec.rb:6:in `block (2 levels) in <top (required)>' It should be fixed with Rails 6.1 rails/rails#35904
Co-authored-by: Jon Rowe <hello@jonrowe.co.uk>
06cb2ce
to
e265a35
Compare
.github/workflows/ci.yml
Outdated
@@ -89,5 +89,6 @@ jobs: | |||
with: | |||
ruby-version: ${{ matrix.ruby }} | |||
- run: script/clone_all_rspec_repos | |||
- run: bundle |
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 had to restore the script to update bundler to get the main builds working 🤔 😬
cd75d59
to
6394472
Compare
Error was happening on Ruby3.0.0-preview1
8fb1d5c
to
67a9899
Compare
.github/workflows/ci.yml
Outdated
env: | ||
RAILS_VERSION: '~> 5.0.0' | ||
env: ${{ matrix.env }} | ||
continue-on-error: ${{ matrix.allow_failure || false }} |
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 doesn't seem to work. :/
https://github.com/rspec/rspec-rails/runs/1438441078?check_suite_focus=true
I am in favor of moving it to script/run_build
step.
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.
SyntaxError: /home/runner/work/rspec-rails/bundle/ruby/2.2.0/gems/actionpack-5.2.4.4/lib/action_dispatch/request/session.rb:96: syntax error, unexpected '.'
id&.public_id
That build is failing genuinely.
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 think they introduced a 2.2.x bug for 5.2... &.
is 2.3 and above.
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.
We have this in 3-9-maintenance 6a8fd07#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485R58
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.
Oh, sorry, I've missed 2.2.2 is tested against 5-2-stable already.
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 think they introduced a 2.2.x bug for 5.2... &. is 2.3 and above.
Yes completely and I didn't see a patch to change that ATM.
I think the PR can be merged. I will have extra work for 6.1.0rc1 that I will probably do in #2400 I will try to move JRuby over GA in another PR. |
🎉 |
Yeehaa |
Move MRI build to Github Actions
Move MRI build to Github Actions
JRuby not moved yet because there is too many issues with it at the moment.
To do in another PR?
add JRuby