Skip to content

Commit bf8278a

Browse files
authored
Merge pull request #747 from rails/rm-ruby-4
Test with Rails 8.1 and Ruby 4.0
2 parents 0b8dfae + 83e9823 commit bf8278a

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "spring",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "ghcr.io/rails/devcontainer/images/ruby:3.4.4",
6+
"image": "ghcr.io/rails/devcontainer/images/ruby:4.0.0",
77
"features": {
88
"ghcr.io/devcontainers/features/github-cli:1": {}
99
}

.github/workflows/ci.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
ruby: [ '3.1', '3.2', '3.3', '3.4', 'head' ]
10-
rails: [ '7.1', '7.2', '8.0', 'edge' ]
9+
ruby: [ '3.1', '3.2', '3.3', '3.4', '4.0', 'head' ]
10+
rails: [ '7.1', '7.2', '8.0', '8.1', 'edge' ]
1111
rubyopt: [""]
1212
include:
1313
- ruby: '3.3'
@@ -16,9 +16,12 @@ jobs:
1616
exclude:
1717
- ruby: '3.1'
1818
rails: 'edge'
19-
rubyopt: ''
2019
- ruby: '3.1'
2120
rails: '8.0'
21+
- ruby: '3.1'
22+
rails: '8.1'
23+
- ruby: '3.2'
24+
rails: 'edge'
2225

2326
env:
2427
RAILS_VERSION: ${{ matrix.rails }}
@@ -41,3 +44,15 @@ jobs:
4144
run: bundle exec rake test:acceptance RUBYOPT="${{ matrix.rubyopt }}"
4245
timeout-minutes: 10
4346
if: ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new`
47+
48+
summary:
49+
runs-on: ubuntu-latest
50+
needs: tests
51+
if: always()
52+
steps:
53+
- name: Check test matrix results
54+
run: |
55+
if [ "${{ needs.tests.result }}" != "success" ]; then
56+
echo "Tests failed or were cancelled"
57+
exit 1
58+
fi

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ elsif ENV["RAILS_VERSION"]
1313
else
1414
gem "activesupport"
1515
end
16+
17+
gem "minitest", "< 6"

test/support/acceptance_test.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def refute_output_includes(command, not_expected)
6565
def assert_speedup(ratio = DEFAULT_SPEEDUP)
6666
if ENV['CI']
6767
yield
68+
assert true
6869
else
6970
app.with_timing do
7071
yield
@@ -673,7 +674,8 @@ def exec_name
673674

674675
FileUtils.cp_r "#{app.gem_home}/", bundle_path.to_s
675676

676-
app.run! "bundle install --path .bundle --local"
677+
app.run! "bundle config set path '.bundle'"
678+
app.run! "bundle install --local"
677679

678680
assert_speedup do
679681
2.times { assert_success "bundle exec rails runner ''" }

test/support/application_generator.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def generate_files
5353
FileUtils.rm_rf(application.path("test/performance"))
5454

5555
append_to_file(application.gemfile, "gem 'spring', '#{Spring::VERSION}'")
56+
append_to_file(application.gemfile, "gem 'minitest', '< 6'")
5657

5758
append_to_file(application.path("config/boot.rb"), "raise 'BOOM' if ENV['CRASH_ON_BOOT']")
5859

0 commit comments

Comments
 (0)