Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Switch to voxpupuli/ruby-version #156

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 18 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,45 @@ env:
BUNDLE_WITHOUT: release

jobs:
rubocop:
rubocop_and_matrix:
runs-on: ubuntu-latest
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
- name: Install Ruby 3.4
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
ruby-version: '3.4'
bundler-cache: true
- name: Run Rubocop
- name: Run RuboCop
run: bundle exec rake rubocop
rspec:
- id: ruby
uses: voxpupuli/ruby-version@v1

test:
name: "Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
needs: rubocop_and_matrix
strategy:
fail-fast: false
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"
env:
# https://github.com/rubygems/rubygems/issues/5234#issuecomment-1003773622
RUBYOPT: '--disable-did_you_mean'
name: RSpec - Ruby ${{ matrix.ruby }}
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: spec tests
- name: Run tests
run: bundle exec rake test
- name: Verify gem builds
- name: Build the gem
run: gem build --strict --verbose *.gemspec

tests:
needs:
- rubocop
- rspec
- test
runs-on: ubuntu-latest
name: Test suite
steps:
Expand Down
Loading