Bump ruby/setup-ruby from 1.152.0 to 1.176.0 #477
Workflow file for this run
This file contains 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: Ruby | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: [2.3.8, 2.4.10, 2.5.9, 2.6.10, 2.7.8, 3.0.6, 3.1.4, 3.2.2] | |
gem-version: [3.3.15] | |
include: | |
- ruby-version: 2.3.8 | |
gem-version: 2.7.11 | |
- ruby-version: 2.4.10 | |
gem-version: 2.7.11 | |
- ruby-version: 2.5.9 | |
gem-version: 2.7.11 | |
# Test with RubyGems 2.5.0 as it is specified in gemspec | |
- ruby-version: 2.3.8 | |
gem-version: 2.5.0 | |
continue-on-error: true | |
- ruby-version: 2.4.10 | |
gem-version: 2.5.0 | |
continue-on-error: true | |
- ruby-version: 2.5.9 | |
gem-version: 2.5.0 | |
continue-on-error: true | |
- ruby-version: 2.6.10 | |
gem-version: 2.5.0 | |
continue-on-error: true | |
- ruby-version: 2.7.8 | |
gem-version: 2.5.0 | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1.176.0 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Use RubyGems with the specific version | |
env: | |
gemver: ${{ matrix.gem-version }} | |
run: | | |
gem update --system $gemver | |
gem --version | |
- name: Run tests | |
env: | |
MINITEST_REPORTER: SpecReporter | |
run: bundle exec rake | |
continue-on-error: ${{ matrix.continue-on-error }} | |
- name: Workaround for coverage report to CodeClimate with jq | |
if: startsWith(matrix.ruby-version, '3.2.') | |
run: | | |
jq 'map_values(. | map_values(if type=="object" then map_values(.lines) else . end))' coverage/.resultset.json > coverage/.resultset_workaround.json | |
diff -uw coverage/.resultset.json coverage/.resultset_workaround.json || true | |
- name: Send coverage report to CodeClimate | |
if: startsWith(matrix.ruby-version, '3.2.') | |
continue-on-error: true | |
uses: paambaati/codeclimate-action@v5.0.0 | |
with: | |
coverageLocations: ${{ github.workspace }}/coverage/.resultset_workaround.json:simplecov | |
env: | |
CC_TEST_REPORTER_ID: 9b585696c2187df640c9fe468b29a1e8cd5ea766a867b2c6f22b7e25d648155b | |
rubocop: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1.176.0 | |
with: | |
ruby-version: 3.2.2 | |
- name: Run RuboCop | |
run: | | |
bundle add rubocop --version 1.55.0 | |
bundle add rubocop-minitest --version 0.20.1 | |
bundle add rubocop-rake --version 0.6.0 | |
bundle exec rubocop |