Skip to content

Bump rubocop from 1.66.1 to 1.67.0 (#68) #73

Bump rubocop from 1.66.1 to 1.67.0 (#68)

Bump rubocop from 1.66.1 to 1.67.0 (#68) #73

Workflow file for this run

name: Ruby CI
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
types:
- opened
- synchronize
- reopened
release:
types:
- published
jobs:
# Test and Lint
test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os:
- ubuntu
- macos
ruby:
- head
- '3.3'
- '3.2'
- '3.1'
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Run linting
run: bundle exec rubocop
- name: Run tests
run: bundle exec rspec spec
# SonarCloud, Codecov, etc.
external:
name: SonarCloud, Codecov and CodeClimate Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Install dependencies
run: bundle install
- name: Run linting
run: bundle exec rubocop --format progress --format json --out rubocop-result.json
- name: Run tests
run: bundle exec rspec spec
# Codecov
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# CodeClimate
- uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
debug: true
coverageLocations: |
coverage/lcov.info:lcov
# Update version for SonarCloud
- name: Set version in sonar-project.properties
run: sed -i -e "s/sonar.projectVersion=.*$/sonar.projectVersion=$(bundle exec rake version)/g" sonar-project.properties
# Fix paths for SonarCloud, because it uses a different container
- name: Fix paths for SonarCloud
run: |
sed -i -e "s#$(pwd)/#/github/workspace/#g" coverage/coverage.json
# SonarCloud
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_SCANNER_JAVA_OPTS: '--add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED'
with:
args: >
-Dsonar.verbose=false