Skip to content

Add Ruby 4.0 support #163

Add Ruby 4.0 support

Add Ruby 4.0 support #163

Workflow file for this run

---
name: Test
on:
pull_request: {}
push:
branches:
- master
# minimal permissions
permissions:
contents: read
jobs:
rubocop_and_matrix:
runs-on: ubuntu-24.04
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v6
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
- name: Run Rubocop
run: bundle exec rake rubocop
- id: ruby
uses: voxpupuli/ruby-version@v2
rspec:
runs-on: ubuntu-24.04
needs: rubocop_and_matrix
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
name: RSpec - Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v6
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: set git config
run: git config --global init.defaultBranch main && git config --global user.email 'user@example.com' && git config --global user.name 'user'
- name: spec tests
env:
GIT_COMMITTER_NAME: 'user'
GIT_COMMITTER_EMAIL: 'user@example.com'
GIT_AUTHOR_NAME: 'user'
GIT_AUTHOR_EMAIL: 'user@example.com'
run: bundle exec rake
- name: Verify gem builds
run: gem build --strict --verbose *.gemspec
tests:
needs:
- rubocop_and_matrix
- rspec
runs-on: ubuntu-24.04
name: Test suite
steps:
- run: echo Test suite completed