diff --git a/.github/workflows/nightly-unit-tests.yaml b/.github/workflows/nightly-unit-tests.yaml index 002c4a35..25d40456 100644 --- a/.github/workflows/nightly-unit-tests.yaml +++ b/.github/workflows/nightly-unit-tests.yaml @@ -11,6 +11,7 @@ jobs: max-parallel: 4 matrix: # Run acceptance tests all supported combinations of Ruby and ActiveRecord. + ruby: ["3.1", "3.2", "3.3"] ar: ["~> 6.1.0", "~> 7.0.0", "~> 7.1.0", "~> 7.2.0", "~> 8.0.0"] # Exclude combinations that are not supported. exclude: diff --git a/Gemfile b/Gemfile index 607c61ac..d2adedf6 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" # Specify your gem's dependencies in activerecord-spanner.gemspec gemspec -ar_version = ENV.fetch("AR_VERSION", "~> 7.1.0") +ar_version = ENV.fetch("AR_VERSION", "~> 7.2.0") gem "activerecord", ar_version gem "ostruct" gem "minitest", "~> 5.25.0" @@ -17,6 +17,7 @@ gem 'sqlite3' install_if -> { ar_version.dup.to_s.sub("~>", "").strip < "7.1.0" && !ENV["SKIP_COMPOSITE_PK"] } do gem "composite_primary_keys" end +gem 'simplecov', require: false, group: :test # Required for samples gem "docker-api" diff --git a/acceptance/test_helper.rb b/acceptance/test_helper.rb index de45dbbd..a0c2cae4 100644 --- a/acceptance/test_helper.rb +++ b/acceptance/test_helper.rb @@ -4,6 +4,14 @@ # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. +require 'simplecov' +SimpleCov.start do + add_filter '/test/' + add_filter '/acceptance/' + add_filter '/benchmarks/' +end + +# Previous content of test helper now starts here gem "minitest" require "minitest/autorun" require "minitest/focus" diff --git a/test/test_helper.rb b/test/test_helper.rb index 965b1106..913111d3 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,6 +4,13 @@ # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. +require 'simplecov' +SimpleCov.start do + add_filter '/test/' + add_filter '/acceptance/' + add_filter '/benchmarks/' +end + require "minitest/autorun" require "minitest/focus" require "minitest/rg"