Skip to content

Merge pull request #63 from khiav223577/feature/support_rails_7_1 #79

Merge pull request #63 from khiav223577/feature/support_rails_7_1

Merge pull request #63 from khiav223577/feature/support_rails_7_1 #79

Workflow file for this run

name: Ruby
on:
push:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
jobs:
test:
runs-on: ubuntu-latest
name: Test
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
strategy:
fail-fast: false
matrix:
orm:
- ACTIVE_RECORD
- MONGOID
ruby:
- 2.3
- 2.6
- 2.7
- 3.0
- 3.1
gemfile:
- active_record_32.gemfile
- active_record_42.gemfile
- active_record_50.gemfile
- active_record_51.gemfile
- active_record_52.gemfile
- active_record_60.gemfile
- active_record_61.gemfile
- active_record_70.gemfile
- active_record_71.gemfile
- mongoid_54.gemfile
- mongoid_64.gemfile
- mongoid_73.gemfile
exclude:
- gemfile: active_record_32.gemfile
ruby: 2.6
- gemfile: active_record_32.gemfile
ruby: 2.7
- gemfile: active_record_32.gemfile
ruby: 3.0
- gemfile: active_record_32.gemfile
ruby: 3.1
- gemfile: active_record_32.gemfile
orm: MONGOID
- gemfile: active_record_42.gemfile
ruby: 2.7
- gemfile: active_record_42.gemfile
ruby: 3.0
- gemfile: active_record_42.gemfile
ruby: 3.1
- gemfile: active_record_42.gemfile
orm: MONGOID
- gemfile: active_record_50.gemfile
ruby: 3.0
- gemfile: active_record_50.gemfile
ruby: 3.1
- gemfile: active_record_50.gemfile
orm: MONGOID
- gemfile: active_record_51.gemfile
ruby: 3.0
- gemfile: active_record_51.gemfile
ruby: 3.1
- gemfile: active_record_51.gemfile
orm: MONGOID
- gemfile: active_record_52.gemfile
ruby: 3.0
- gemfile: active_record_52.gemfile
ruby: 3.1
- gemfile: active_record_52.gemfile
orm: MONGOID
- gemfile: active_record_60.gemfile
ruby: 2.3
- gemfile: active_record_60.gemfile
orm: MONGOID
- gemfile: active_record_61.gemfile
ruby: 2.3
- gemfile: active_record_61.gemfile
orm: MONGOID
- gemfile: active_record_70.gemfile
ruby: 2.3
- gemfile: active_record_70.gemfile
ruby: 2.6
- gemfile: active_record_70.gemfile
orm: MONGOID
- gemfile: active_record_71.gemfile
ruby: 2.3
- gemfile: active_record_71.gemfile
ruby: 2.6
- gemfile: active_record_71.gemfile
orm: MONGOID
- gemfile: mongoid_54.gemfile
ruby: 2.7
- gemfile: mongoid_54.gemfile
ruby: 3.0
- gemfile: mongoid_54.gemfile
ruby: 3.1
- gemfile: mongoid_54.gemfile
orm: ACTIVE_RECORD
- gemfile: mongoid_64.gemfile
orm: ACTIVE_RECORD
- gemfile: mongoid_73.gemfile
orm: ACTIVE_RECORD
env:
BUNDLE_GEMFILE: "gemfiles/${{ matrix.gemfile }}"
ORM_TYPE: "${{ matrix.orm }}"
services:
mongodb:
image: mongo:3.6.23
ports:
- 27017:27017
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
if: env.ORM_TYPE == 'ACTIVE_RECORD'
run: bundle exec rake test_active_record
- name: Run tests
if: env.ORM_TYPE == 'MONGOID'
run: bundle exec rake test_mongoid
- name: Publish code coverage
if: ${{ success() && env.CC_TEST_REPORTER_ID }}
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}