diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 905d5379..7449c31e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "spring", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "ghcr.io/rails/devcontainer/images/ruby:3.4.4", + "image": "ghcr.io/rails/devcontainer/images/ruby:4.0.0", "features": { "ghcr.io/devcontainers/features/github-cli:1": {} } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 210a42bf..c00289e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,8 +6,8 @@ jobs: strategy: fail-fast: false matrix: - ruby: [ '3.1', '3.2', '3.3', '3.4', 'head' ] - rails: [ '7.1', '7.2', '8.0', 'edge' ] + ruby: [ '3.1', '3.2', '3.3', '3.4', '4.0', 'head' ] + rails: [ '7.1', '7.2', '8.0', '8.1', 'edge' ] rubyopt: [""] include: - ruby: '3.3' @@ -16,9 +16,12 @@ jobs: exclude: - ruby: '3.1' rails: 'edge' - rubyopt: '' - ruby: '3.1' rails: '8.0' + - ruby: '3.1' + rails: '8.1' + - ruby: '3.2' + rails: 'edge' env: RAILS_VERSION: ${{ matrix.rails }} @@ -41,3 +44,15 @@ jobs: run: bundle exec rake test:acceptance RUBYOPT="${{ matrix.rubyopt }}" timeout-minutes: 10 if: ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new` + + summary: + runs-on: ubuntu-latest + needs: tests + if: always() + steps: + - name: Check test matrix results + run: | + if [ "${{ needs.tests.result }}" != "success" ]; then + echo "Tests failed or were cancelled" + exit 1 + fi diff --git a/Gemfile b/Gemfile index 59339f17..43bc15d7 100644 --- a/Gemfile +++ b/Gemfile @@ -13,3 +13,5 @@ elsif ENV["RAILS_VERSION"] else gem "activesupport" end + +gem "minitest", "< 6" diff --git a/test/support/acceptance_test.rb b/test/support/acceptance_test.rb index 34876755..d4d7f6ed 100644 --- a/test/support/acceptance_test.rb +++ b/test/support/acceptance_test.rb @@ -65,6 +65,7 @@ def refute_output_includes(command, not_expected) def assert_speedup(ratio = DEFAULT_SPEEDUP) if ENV['CI'] yield + assert true else app.with_timing do yield @@ -673,7 +674,8 @@ def exec_name FileUtils.cp_r "#{app.gem_home}/", bundle_path.to_s - app.run! "bundle install --path .bundle --local" + app.run! "bundle config set path '.bundle'" + app.run! "bundle install --local" assert_speedup do 2.times { assert_success "bundle exec rails runner ''" } diff --git a/test/support/application_generator.rb b/test/support/application_generator.rb index 84a3403a..ffa15c38 100644 --- a/test/support/application_generator.rb +++ b/test/support/application_generator.rb @@ -53,6 +53,7 @@ def generate_files FileUtils.rm_rf(application.path("test/performance")) append_to_file(application.gemfile, "gem 'spring', '#{Spring::VERSION}'") + append_to_file(application.gemfile, "gem 'minitest', '< 6'") append_to_file(application.path("config/boot.rb"), "raise 'BOOM' if ENV['CRASH_ON_BOOT']")