Add Ruby versions 3.5 and 4.0 to CI matrix #7
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| rubygems: latest | |
| - name: Run RuboCop | |
| run: bundle exec rubocop --fail-level warning --display-only-fail-level-offenses --format github | |
| test: | |
| name: Test - ${{ matrix.gemfile }} - Ruby ${{ matrix.ruby }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ruby: ["3.0", 3.1, 3.2, 3.3, 3.4, 3.5, 4.0] | |
| gemfile: | |
| [ | |
| activesupport-7.1, | |
| activesupport-7.2, | |
| activesupport-8.0, | |
| activesupport-8.1, | |
| ] | |
| exclude: | |
| # Rails 7.2 is >= 3.1 | |
| - ruby: "3.0" | |
| gemfile: activesupport-7.2 | |
| # Rails 8.0 is >= 3.2 | |
| - ruby: "3.0" | |
| gemfile: activesupport-8.0 | |
| - ruby: 3.1 | |
| gemfile: activesupport-8.0 | |
| # Rails 8.1 is >= 3.2 | |
| - ruby: "3.0" | |
| gemfile: activesupport-8.1 | |
| - ruby: 3.1 | |
| gemfile: activesupport-8.1 | |
| env: | |
| BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Update .ruby-version with matrix value | |
| run: echo "${{ matrix.ruby }}" >| .ruby-version | |
| # Dependencies | |
| - name: Set up Ruby and bundle install | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| rubygems: latest | |
| # Test | |
| - name: Run Unit tests | |
| run: bundle exec rspec | |
| - name: Publish Test Results | |
| uses: mikepenz/action-junit-report@v4 | |
| if: always() | |
| with: | |
| check_name: Test Results | |
| report_paths: tmp/rspec.xml | |
| detailed_summary: true |