Skip to content

Commit

Permalink
test: get coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
semirp committed Apr 23, 2024
1 parent 64d59e9 commit 4d4c888
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
if: false
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand Down
15 changes: 15 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ appetize_api_token = ENV['APPETIZE_API_TOKEN']
github_run_id = ENV["GITHUB_RUN_ID"]
github_run_number = ENV["GITHUB_RUN_NUMBER"]

# Sonar
sonar_token = ENV["SONAR_TOKEN"]

# Xcode
app_workspace = "Debug App/Primer.io Debug App.xcworkspace"

Expand Down Expand Up @@ -120,8 +123,20 @@ platform :ios do
sdk: "iphonesimulator17.2",
destination: "OS=17.2,name=iPhone 15 Pro",
result_bundle: true,
code_coverage: true,
output_directory: Dir.pwd + "/test_output"
)
slather(
scheme: "PrimerSDKTests",
workspace: app_workspace,
output_directory: "reports",
proj: app_xcode_proj,
cobertura_xml: "true"
)
sonar(
sonar_login: sonar_token,
sonar_url: "https://sonarcloud.io"
)
end

lane :build_cocoapods do |options|
Expand Down
6 changes: 6 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ sonar.language=swift
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-


sonar.junit.reportsPath=reports/
sonar.junit.include=*.junit
sonar.swift.coverage.reportPattern=reports/cobertura.xml
sonar.swift.swiftlint.report=reports/*swiftlint.txt

0 comments on commit 4d4c888

Please sign in to comment.