Skip to content

Commit

Permalink
Replace codeclimate with sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
louman committed Sep 27, 2023
1 parent e580bc8 commit 0d9036e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,19 @@ jobs:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
run: bundle exec rspec

- name: Publish code coverage
uses: paambaati/codeclimate-action@v4.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
coverageLocations: |
${{github.workspace}}/coverage/coverage.json:simplecov
args: >
-Dsonar.organization=readytech
-Dsonar.projectKey=rdytech_patches
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.sources=lib/
-Dsonar.inclusions=**/*.rb
-Dsonar.tests=spec/
-Dsonar.ruby.coverage.reportPaths=coverage/.resultset.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}


3 changes: 1 addition & 2 deletions patches.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "rspec-rails", "~> 4.0.0"
spec.add_development_dependency "capybara", "~> 2.3.0"
spec.add_development_dependency "generator_spec", "~> 0.9.0"
spec.add_development_dependency "simplecov", "~> 0.21"
spec.add_development_dependency "simplecov_json_formatter", "~> 0.1.2"
spec.add_development_dependency "simplecov", "~> 0.17", '< 0.18' # sonarscanner requires < 0.18
spec.add_development_dependency "factory_girl", "~> 4.5.0"
spec.add_development_dependency "timecop", "~> 0.7.0"
spec.add_development_dependency "database_cleaner", "~> 1.3.0"
Expand Down
2 changes: 0 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
config.default_formatter = 'doc'
else
require 'simplecov'
require 'simplecov_json_formatter'
SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
SimpleCov.start
end
end
Expand Down

0 comments on commit 0d9036e

Please sign in to comment.