Skip to content

Commit daba2f7

Browse files
committed
ci: add slather coverage generation for sonarqube (SDKCF-4826)
1 parent 1e8d81f commit daba2f7

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.sonarcloud.properties

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
sonar.sources=./Sources
2-
sonar.coverageReportPaths=./artifacts/coverage/sonarqube-generic-coverage.xml
32
sonar.exclusions=./Tests

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ gem "danger"
66
gem "danger-xcov"
77
gem "xcode-install"
88
gem "jazzy"
9+
gem "slather"

fastlane/Fastfile

+9-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@ platform :ios do
3535

3636
desc "Generate code coverage"
3737
lane :coverage do |options|
38-
Dir.chdir("..") do
39-
sh("bundle exec danger dry_run")
40-
end
38+
slather(
39+
output_directory: './artifacts/coverage',
40+
scheme: ENV['REM_FL_TESTS_SCHEME'] || 'Tests',
41+
sonarqube_xml: true,
42+
use_bundle_exec: true,
43+
proj: ENV['REM_FL_TESTS_PROJECT'],
44+
workspace: ENV['REM_FL_TESTS_WORKSPACE'],
45+
binary_basename: ENV['REM_FL_TESTS_SLATHER_BASENAME'],
46+
ignore: '*.{h,m}')
4147
end
4248
end
4349
# vim:syntax=ruby:et:sts=2:sw=2:ts=2:ff=unix:

0 commit comments

Comments
 (0)