-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Move MRI build to Github Actions #2404
Changes from 8 commits
fb018f1
1d12c96
6b7eec0
08bdd11
7667604
e265a35
6394472
67a9899
029416b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: RSpec CI | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- '*-maintenance' | ||
- '*-dev' | ||
pull_request: | ||
branches: | ||
- '*' | ||
jobs: | ||
test: | ||
name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.env.RAILS_VERSION }}' | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Rails 6.0 builds >= 2.5.0 | ||
- ruby: 3.0.0-preview1 | ||
env: | ||
RAILS_VERSION: '~> 6.0.0' | ||
- ruby: 2.7 | ||
env: | ||
RAILS_VERSION: '~> 6.0.0' | ||
- ruby: 2.6 | ||
env: | ||
RAILS_VERSION: '~> 6.0.0' | ||
- ruby: 2.5 | ||
env: | ||
RAILS_VERSION: '~> 6.0.0' | ||
# Rails 5.2 builds >= 2.2.2 | ||
- ruby: 2.6.6 | ||
env: | ||
RAILS_VERSION: '~> 5.2.0' | ||
- ruby: 2.5.8 | ||
env: | ||
RAILS_VERSION: '~> 5.2.0' | ||
- ruby: 2.4.10 | ||
env: | ||
RAILS_VERSION: '~> 5.2.0' | ||
- ruby: 2.3.8 | ||
env: | ||
RAILS_VERSION: '~> 5.2.0' | ||
- ruby: 2.2.10 | ||
allow_failure: true | ||
env: | ||
RAILS_VERSION: '~> 5.2.0' | ||
- ruby: 2.2.10 | ||
env: | ||
RAILS_VERSION: '5-2-stable' | ||
# Rails 5.1 Builds >= 2.2.2 | ||
- ruby: 2.6.6 | ||
env: | ||
RAILS_VERSION: '~> 5.1.0' | ||
- ruby: 2.5.8 | ||
env: | ||
RAILS_VERSION: '~> 5.1.0' | ||
- ruby: 2.4.10 | ||
env: | ||
RAILS_VERSION: '~> 5.1.0' | ||
- ruby: 2.3.8 | ||
env: | ||
RAILS_VERSION: '~> 5.1.0' | ||
- ruby: 2.2.10 | ||
env: | ||
RAILS_VERSION: '~> 5.1.0' | ||
# Rails 5.0 Builds >= 2.2.2 | ||
- ruby: 2.6.6 | ||
env: | ||
RAILS_VERSION: '~> 5.0.0' | ||
- ruby: 2.5.8 | ||
env: | ||
RAILS_VERSION: '~> 5.0.0' | ||
- ruby: 2.4.10 | ||
env: | ||
RAILS_VERSION: '~> 5.0.0' | ||
- ruby: 2.3.8 | ||
env: | ||
RAILS_VERSION: '~> 5.0.0' | ||
- ruby: 2.2.10 | ||
env: | ||
RAILS_VERSION: '~> 5.0.0' | ||
env: ${{ matrix.env }} | ||
continue-on-error: ${{ matrix.allow_failure || false }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- run: script/clone_all_rspec_repos | ||
- run: bundle install --binstubs | ||
- run: script/run_build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
# Generators are not automatically loaded by Rails | ||
require 'generators/rspec/scaffold/scaffold_generator' | ||
require 'support/generators' | ||
require 'rspec/support/spec/in_sub_process' | ||
|
||
RSpec.describe Rspec::Generators::ScaffoldGenerator, type: :generator do | ||
include RSpec::Support::InSubProcess | ||
setup_default_destination | ||
|
||
describe 'standard request specs' do | ||
|
@@ -41,12 +43,13 @@ | |
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] | ||
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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 🤯 😱 |
||
allow_any_instance_of(::Rails::Generators::NamedBase).to receive(:mountable_engine?).and_return(true) | ||
run_generator %w[posts --request_specs] | ||
is_expected.to contain('Engine.routes.url_helpers') | ||
end | ||
end | ||
|
||
it { is_expected.to contain('Engine.routes.url_helpers') } | ||
end | ||
end | ||
|
||
|
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.
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.
Yes completely and I didn't see a patch to change that ATM.