-
Notifications
You must be signed in to change notification settings - Fork 4
fix: adds coverage #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
81c03d9
adds coverage
pandeymangg 68bea45
bumps ruby version
pandeymangg 1682035
fixes test command
pandeymangg 2a3213b
fixes iphone sdk error
pandeymangg 7337a12
action
pandeymangg 5e7c3f3
action
pandeymangg b1aa7e0
breaks action into steps
pandeymangg 1df812a
fixes action
pandeymangg c1f0f34
fixes action
pandeymangg 02777b4
fixes action
pandeymangg 9b054bf
fixes action
pandeymangg a778d61
fixes action
pandeymangg 9edeff9
fixes action
pandeymangg 3ceee29
fixes action
pandeymangg a332374
fixes action
pandeymangg aca1776
fixes action
pandeymangg 8e1fa7d
fixes action
pandeymangg 8fcd402
update action
mattinannt 06e68bf
update action
mattinannt 79343f2
update to 18.4
mattinannt 49988a5
fix first tests
mattinannt 803252b
fix all tests
mattinannt 6cc205f
pin sonarcloud github action
mattinannt 48fd76e
fix action build step
mattinannt 0b7033e
update simulator version and verify test bundle
mattinannt d4f7fee
fix build output location
mattinannt e5a3d0e
mocks
pandeymangg dad4b9b
mocks
pandeymangg 225de3c
mocks
pandeymangg abfc383
adds logs
pandeymangg 2d8b475
adds logs
pandeymangg 40204f7
adds logs
pandeymangg 7fb454b
adds logs
pandeymangg 428694d
adds logs
pandeymangg bfd04bc
adds logs
pandeymangg 5670c90
adds logs
pandeymangg c90719c
lock macos version
mattinannt 83b93f3
Merge branch 'fix/coverage' of github.com:formbricks/ios into fix/cov…
mattinannt ac237bc
modify mock
mattinannt 977d6ff
adds logs
pandeymangg 0f574b7
Merge branch 'fix/coverage' of https://github.com/formbricks/ios into…
pandeymangg 2bef172
fix action
pandeymangg ec7ce97
cleanup
pandeymangg 9586acc
action tests
pandeymangg a7cc3e3
fixes comma error
pandeymangg 3136b45
tests
pandeymangg d4e5e19
tests
pandeymangg 533f60c
tests
pandeymangg f3c07b7
tests
pandeymangg 42e70b8
tests
pandeymangg 955550e
tests
pandeymangg 4feb3b3
tests
pandeymangg fd86804
tests
pandeymangg b66a661
tests
pandeymangg 67b9f15
tests
pandeymangg 172bdb2
adjusts timeouts
pandeymangg 8317662
adjusts timeouts
pandeymangg 85c403f
adjusts timeouts
pandeymangg d4427d1
adjusts timeouts
pandeymangg b261d7e
adjusts timeouts
pandeymangg 53b24f5
adds completion callback to track method
pandeymangg 1c8fec2
tests
pandeymangg 40bc406
tests
pandeymangg 24e3cb8
adds cleanup test
pandeymangg 29bf003
edits test
pandeymangg 20963f3
edits test
pandeymangg 345bbcf
edits test
pandeymangg 1ab47e8
edits test
pandeymangg c36cb25
edits test
pandeymangg 0759771
edits coverage action
pandeymangg 32ab367
edits coverage action
pandeymangg f1f7c5d
edits coverage action
pandeymangg f2e6d8b
edits coverage action
pandeymangg 278d2c0
edits coverage action
pandeymangg 42c029a
edits coverage action
pandeymangg a591e80
edits coverage action
pandeymangg 2c5d327
edits coverage action
pandeymangg dff2f81
edits coverage action
pandeymangg 87a6bc3
edits coverage action
pandeymangg f9b8c67
edits coverage action
pandeymangg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: SonarQube | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| merge_group: | ||
|
|
||
| jobs: | ||
| build-and-analyze: | ||
| runs-on: macos-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
|
|
||
| # Install Ruby (for Slather) and Slather itself | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: "2.7" | ||
| - name: Install slather | ||
| run: gem install slather | ||
|
|
||
| # 1. Build & run tests via xcodebuild, collecting coverage | ||
| - name: Run tests & collect coverage | ||
| run: | | ||
| xcodebuild \ | ||
| -scheme FormbricksSDK-Package \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 14,OS=17.0' \ | ||
| -derivedDataPath build \ | ||
| -enableCodeCoverage YES \ | ||
| test | ||
|
|
||
| # 2. Generate Cobertura XML from that Xcode-derived coverage | ||
| - name: Generate Cobertura XML | ||
| run: | | ||
| slather coverage \ | ||
| --workspace .swiftpm/xcode/package.xcworkspace \ | ||
| --scheme FormbricksSDK-Package \ | ||
| --cobertura-xml \ | ||
| --output-directory coverage \ | ||
| . | ||
|
|
||
| # 3. Run SonarCloud scan, pointing at the Cobertura report | ||
| - name: SonarCloud Scan | ||
| uses: SonarSource/sonarcloud-github-action@master | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| sonar.projectKey=formbricks_ios | ||
| sonar.organization=formbricks | ||
|
|
||
| #— Source & Test Locations —# | ||
| sonar.sources=Sources/FormbricksSDK | ||
| sonar.tests=Tests/FormbricksSDKTests | ||
|
|
||
| #— Coverage Report —# | ||
| # path(s) relative to the repository root | ||
| sonar.coverage.cobertura.xmlReportPaths=coverage/cobertura.xml | ||
|
|
||
| #— Exclusions —# | ||
| # skip test classes, mocks, generated files, etc. | ||
| sonar.exclusions=**/Mock/**,**/*.xcodeproj/**,**/.swiftpm/** | ||
|
|
||
| #— (Optional) Test File Inclusions —# | ||
| # if you want Sonar to know which files are tests | ||
| sonar.test.inclusions=Tests/FormbricksSDKTests/**/*.swift | ||
|
|
||
| #— Encoding & Language —# | ||
| sonar.sourceEncoding=UTF-8 | ||
| sonar.language=swift |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.