Bump rubocop from 1.67.0 to 1.68.0 (#69) #77
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 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/[email protected] | |
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/[email protected] | |
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 |