# This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby name: CI on: push: branches: [main] pull_request: branches: [main] schedule: - cron: '30 5 * * *' jobs: test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby-version: ['2.6', '2.7', '3.0', '3.1', jruby, truffleruby] gemfile: [rails-5.2.x, rails-6.0.x, rails-6.1.x, rails-7.0.x] exclude: # ruby 3 is not compatible with rails < 6 - ruby-version: '3.0' gemfile: rails-5.2.x - ruby-version: 'truffleruby' gemfile: rails-5.2.x # ruby 3.1 is not compatible with rails < 7 - ruby-version: '3.1' gemfile: rails-5.2.x - ruby-version: '3.1' gemfile: rails-6.0.x - ruby-version: '3.1' gemfile: rails-6.1.x # ruby < 2.7 is not compatible with rails 7 - ruby-version: '2.6' gemfile: rails-7.0.x # jruby is not compatible with rails 7 (yet) - ruby-version: 'jruby' gemfile: rails-7.0.x env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile name: test (ruby ${{ matrix.ruby-version }}, ${{ matrix.gemfile }}) steps: - name: Checkout uses: actions/checkout@v3 - name: Set up Ruby # Using ruby/setup-ruby@v1 will automatically get bug fixes and new Ruby # versions for ruby/setup-ruby (see # https://github.com/ruby/setup-ruby#versioning). uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests run: bundle exec rake