Skip to content

[RST-13] Migrate to Sonarqube #36

[RST-13] Migrate to Sonarqube

[RST-13] Migrate to Sonarqube #36

Workflow file for this run

name: Run specs
on:
pull_request:
branches:
- develop
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Run specs
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: bundle exec rspec
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
args: >
-Dsonar.projectKey=rdytech_patches_4fe7fcf4-bbfc-4b19-be78-87e73d1f301e
-Dsonar.host.url=https://sonarqube.readytech.io
-Dsonar.sources=lib/
-Dsonar.inclusions=**/*.rb
-Dsonar.tests=spec/
-Dsonar.ruby.coverage.reportPaths=coverage/.resultset.json
-Dsonar.plugins.downloadOnlyRequired=true
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}