Drop support for Ruby < 3.2 and Rails < 7.2 #507
This file contains hidden or 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 | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| test: | |
| name: ${{ matrix.ruby }} | |
| runs-on: ubuntu-latest | |
| env: | |
| COVERAGE_RUBY_VERSION: 3.2 | |
| BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: | |
| - 3.2 | |
| - 3.3 | |
| - 3.4 | |
| - 4.0 | |
| - jruby-9 | |
| - truffleruby | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Restore cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.BUNDLE_PATH }} | |
| key: ruby-${{ matrix.ruby }}-gems-${{ hashFiles('config.gemspec', 'gemfiles/**') }} | |
| restore-keys: | | |
| ruby-${{ matrix.ruby }}-gems- | |
| - name: Install | |
| run: | | |
| bundle install | |
| bundle exec appraisal install | |
| - name: Test | |
| run: bundle exec appraisal rspec | |
| - name: Publish code coverage | |
| if: startsWith(env.RUBY_VERSION, env.COVERAGE_RUBY_VERSION) | |
| uses: paambaati/codeclimate-action@v4.0.0 | |
| env: | |
| CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
| with: | |
| coverageCommand: bundle exec appraisal rspec | |
| all-passed: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - test | |
| steps: | |
| - run: exit ${{ contains(needs.*.result, 'failure') && 1 || 0 }} |