From dfbf24e94712258e576c61d4cd3933e0bcfcf781 Mon Sep 17 00:00:00 2001 From: Tim Diggins Date: Sat, 9 Nov 2024 13:33:02 +0000 Subject: [PATCH] tweaks to github actions testing (for 7.0, 7.1, 7.2, 8.0) --- .github/workflows/testing.yml | 12 ++++++++---- Gemfile | 7 +------ rails_7.0.gemfile | 17 +++++++++++++++++ rails_7.1.gemfile | 17 +++++++++++++++++ rails_7.2.gemfile | 17 +++++++++++++++++ rails_8.0.gemfile | 17 +++++++++++++++++ 6 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 rails_7.0.gemfile create mode 100644 rails_7.1.gemfile create mode 100644 rails_7.2.gemfile create mode 100644 rails_8.0.gemfile diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 732346d..2a2edde 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -1,5 +1,7 @@ name: RSpec Test Matrix -on: push +on: + push: + pull_request: jobs: test: @@ -7,15 +9,17 @@ jobs: strategy: fail-fast: false matrix: - rails: ['~> 7.1.0', '~> 7.0.0'] - ruby: ['3.1', '3.2', '3.3'] + rails: ["7.0", "7.1", "7.2", "8.0"] + ruby: ["3.1", "3.2", "3.3"] env: - RAILS_VERSION: ${{ matrix.rails }} + BUNDLE_GEMFILE: "spec/gemfiles/rails_${{ matrix.rails }}.gemfile" steps: - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} + bundler-cache: true # install gems and cache - run: bundle install - run: bundle exec rspec diff --git a/Gemfile b/Gemfile index ecc2060..0b5506c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,3 @@ source 'https://rubygems.org' -# Specify your gem's dependencies in active_record_union.gemspec -gemspec - -gem 'rails', ENV.fetch('RAILS_VERSION') -gem 'pg' -gem 'sqlite3', '~> 1.3' +eval_gemfile File.expand_path('./rails_8.0.gemfile', __dir__) diff --git a/rails_7.0.gemfile b/rails_7.0.gemfile new file mode 100644 index 0000000..83fe1d0 --- /dev/null +++ b/rails_7.0.gemfile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +# Specify your gem's dependencies in active_record_union.gemspec +gemspec + +gem 'rails', '~> 7.0.0' + +# https://github.com/rails/rails/blob/v7.0.2/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13 +gem 'sqlite3', '~> 1.4' + +# https://github.com/rails/rails/blob/v7.0.2/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L4 +gem 'pg', '~> 1.1' + +# https://github.com/rails/rails/blob/v7.0.2/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6 +gem 'mysql2', '~> 0.5' diff --git a/rails_7.1.gemfile b/rails_7.1.gemfile new file mode 100644 index 0000000..b599c1a --- /dev/null +++ b/rails_7.1.gemfile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +# Specify your gem's dependencies in active_record_union.gemspec +gemspec + +gem 'rails', '~> 7.1.0' + +# https://github.com/rails/rails/blob/v7.1.2/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13 +gem 'sqlite3', '~> 1.4' + +# https://github.com/rails/rails/blob/v7.1.2/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L4 +gem 'pg', '~> 1.1' + +# https://github.com/rails/rails/blob/v7.1.2/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6 +gem 'mysql2', '~> 0.5' diff --git a/rails_7.2.gemfile b/rails_7.2.gemfile new file mode 100644 index 0000000..1899253 --- /dev/null +++ b/rails_7.2.gemfile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +# Specify your gem's dependencies in active_record_union.gemspec +gemspec + +gem 'rails', '~> 7.2.0' + +# https://github.com/rails/rails/blob/v7.2.0/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13 +gem 'sqlite3', '>= 1.4' + +# https://github.com/rails/rails/blob/v7.2.0/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L4 +gem 'pg', '~> 1.1' + +# https://github.com/rails/rails/blob/v7.2.0/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6 +gem 'mysql2', '~> 0.5' diff --git a/rails_8.0.gemfile b/rails_8.0.gemfile new file mode 100644 index 0000000..7c87d2e --- /dev/null +++ b/rails_8.0.gemfile @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +source 'https://rubygems.org' + +# Specify your gem's dependencies in active_record_union.gemspec +gemspec + +gem 'rails', '~> 8.0.0' + +# https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb#L13 +gem 'sqlite3', '>= 2.1' + +# https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb#L4 +gem 'pg', '~> 1.1' + +# https://github.com/rails/rails/blob/main/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb#L6 +gem 'mysql2', '~> 0.5'