From f0bf31e13025f1b2857b76faa3087afb57ff049c Mon Sep 17 00:00:00 2001 From: Nony Dutton Date: Mon, 1 Jul 2024 11:33:21 +0200 Subject: [PATCH] Test against Rails main Drop upper limit on Rails, test against Rails main. --- .github/workflows/ci.yml | 1 + .github/workflows/test_against_rails_main.yml | 28 +++++++++++++++++++ .gitignore | 1 + CHANGELOG.md | 1 + gemfiles/rails6.1.gemfile.lock | 2 +- gemfiles/rails7.0.gemfile.lock | 2 +- gemfiles/rails7.1.gemfile.lock | 2 +- gemfiles/rails_main.gemfile | 6 ++++ zombie_record.gemspec | 2 +- 9 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test_against_rails_main.yml create mode 100644 gemfiles/rails_main.gemfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83f88ca..b72a6f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: - rails6.1 - rails7.0 - rails7.1 + - rails_main env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile steps: diff --git a/.github/workflows/test_against_rails_main.yml b/.github/workflows/test_against_rails_main.yml new file mode 100644 index 0000000..967dd8e --- /dev/null +++ b/.github/workflows/test_against_rails_main.yml @@ -0,0 +1,28 @@ +name: Test against Rails main + +on: + schedule: + - cron: "0 0 * * *" # Run every day at 00:00 UTC + workflow_dispatch: + +jobs: + specs: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: + - '3.3' + gemfile: + - rails_main + env: + BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: RSpec + run: bundle exec rspec diff --git a/.gitignore b/.gitignore index fe29dd8..8e447f3 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .config .yardoc /Gemfile.lock +/gemfiles/rails_main.gemfile.lock InstalledFiles _yardoc coverage diff --git a/CHANGELOG.md b/CHANGELOG.md index cad19fe..329e929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ###### Unreleased +* Drop upper limit on Rails, test with Rails main. * Drop support for Rails < 6.0. * Drop support for Ruby 2.7 & 3.0. diff --git a/gemfiles/rails6.1.gemfile.lock b/gemfiles/rails6.1.gemfile.lock index 3a01d98..230df18 100644 --- a/gemfiles/rails6.1.gemfile.lock +++ b/gemfiles/rails6.1.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: zombie_record (1.7.0) - activerecord (>= 6.1, < 7.2) + activerecord (>= 6.1) GEM remote: https://rubygems.org/ diff --git a/gemfiles/rails7.0.gemfile.lock b/gemfiles/rails7.0.gemfile.lock index d37ec25..e0fb0e7 100644 --- a/gemfiles/rails7.0.gemfile.lock +++ b/gemfiles/rails7.0.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: zombie_record (1.7.0) - activerecord (>= 6.1, < 7.2) + activerecord (>= 6.1) GEM remote: https://rubygems.org/ diff --git a/gemfiles/rails7.1.gemfile.lock b/gemfiles/rails7.1.gemfile.lock index 237fae3..b46f6f9 100644 --- a/gemfiles/rails7.1.gemfile.lock +++ b/gemfiles/rails7.1.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: .. specs: zombie_record (1.7.0) - activerecord (>= 6.1, < 7.2) + activerecord (>= 6.1) GEM remote: https://rubygems.org/ diff --git a/gemfiles/rails_main.gemfile b/gemfiles/rails_main.gemfile new file mode 100644 index 0000000..f345d4e --- /dev/null +++ b/gemfiles/rails_main.gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gemspec path: "../" + +gem "activerecord", github: "rails/rails", branch: "main" +gem "sqlite3" diff --git a/zombie_record.gemspec b/zombie_record.gemspec index 6e6fb94..442025b 100644 --- a/zombie_record.gemspec +++ b/zombie_record.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = ">= 3.1" - spec.add_dependency "activerecord", ">= 6.1", "< 7.2" + spec.add_dependency "activerecord", ">= 6.1" spec.add_development_dependency "bundler" spec.add_development_dependency "byebug"