Merge pull request #5 from knu/rails-7.1 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: [ '3.0', '3.1', '3.2', '3.3', 'ruby-head' ] | |
activerecord: [ '6.1', '7.0', '7.1' ] # rails < 6 crashes on ruby 3 due to kwargs changes | |
include: | |
- ruby: '2.6' | |
activerecord: '5.2' | |
- ruby: '2.6' | |
activerecord: '6.1' | |
# rails >= 7 requires ruby >= 2.7 | |
- ruby: '2.7' | |
activerecord: '5.2' | |
- ruby: '2.7' | |
activerecord: '6.1' | |
- ruby: '2.7' | |
activerecord: '7.0' | |
- ruby: '2.7' | |
activerecord: '7.1' | |
exclude: | |
# rails < 7.1 crashes on ruby >= 3.4 due to the removal of mutex_m | |
- ruby: 'ruby-head' | |
activerecord: '6.1' | |
- ruby: 'ruby-head' | |
activerecord: '7.0' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby ${{ matrix.ruby }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- name: Update RubyGems for Ruby 2 | |
run: | | |
gem install rubygems-update -v '< 3.5' && update_rubygems | |
if: matrix.ruby < '3.0' | |
- name: Update RubyGems for Ruby 3 | |
run: | | |
gem update --system | |
if: matrix.ruby >= '3.0' | |
- name: Install dependencies | |
run: | | |
BUNDLE_GEMFILE=./gemfiles/activerecord_${{matrix.activerecord}}.gemfile bundle install --jobs 4 | |
- name: Test with activerecord ${{matrix.activerecord}} | |
run: BUNDLE_GEMFILE=./gemfiles/activerecord_${{matrix.activerecord}}.gemfile bundle exec rake | |
- uses: codecov/codecov-action@v3 | |
if: matrix.ruby >= '3.0' |