Skip to content

CI: Introduce ruby_versions.yml to add supported Ruby versions automatically #46

CI: Introduce ruby_versions.yml to add supported Ruby versions automatically

CI: Introduce ruby_versions.yml to add supported Ruby versions automatically #46

Workflow file for this run

name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 1 * *'
jobs:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.7
build:
needs: ruby-versions
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
mongodb-version: ['5.0', '4.4', '4.2']
os:
- ubuntu-latest
experimental: [false]
exclude:
- ruby: head
include:
- ruby: head
os: ubuntu-latest
experimental: true
mongodb-version: '4.0'
- ruby: head
os: ubuntu-latest
experimental: true
mongodb-version: '4.2'
- ruby: head
os: ubuntu-latest
experimental: true
mongodb-version: '4.4'
name: Ruby ${{ matrix.ruby }} and MongoDB ${{ matrix.mongodb-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: unit testing
env:
CI: true
run: |
bundle install --jobs 4 --retry 3
bundle exec rake test