diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d22bfb14..2ca2a7de 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,6 +15,9 @@ jobs: - '2.7' - '3.0' - '3.1' + rails-version: + - '6.1' + - '7.0' services: postgres: image: postgres:13 @@ -39,6 +42,7 @@ jobs: PGPORT: 5432 PGUSER: postgres PGPASSWORD: password + TEST_RAILS_VERSION: ${{ matrix.rails-version }} # for the mysql cli (mysql, mysqladmin) MYSQL_HOST: 127.0.0.1 MYSQL_PWD: password @@ -64,7 +68,7 @@ jobs: DB: mysql2 run: bundle exec rake - name: Report code coverage - if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.1' }} + if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '3.1' && matrix.rails-version == '6.1' }} continue-on-error: true uses: paambaati/codeclimate-action@v5 env: diff --git a/Gemfile b/Gemfile index 5c32b75d..7bc16448 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,14 @@ source "https://rubygems.org" -gem "activerecord", "~> 6.1.4" +version = ENV['TEST_RAILS_VERSION'] +case version +when "6.1", "7.0" + gem "activerecord", "~>#{version}", "< #{version.to_f + 0.1}" +else + gem "activerecord", "~>6.1", "< 7.0" +end + gem "mysql2" gem "pg" gem "sqlite3"