-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Move MRI build to Github Actions #2404
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
Changes from all 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 }} | ||
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 | ||
continue-on-error: ${{ matrix.allow_failure || false }} |
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 | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.