Skip to content

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 80 commits into from
May 15, 2025
Merged

fix: adds coverage #10

merged 80 commits into from
May 15, 2025

Conversation

pandeymangg
Copy link
Contributor

This pull request introduces SonarQube integration for code quality and coverage analysis, adds support for resource files in tests, and refactors the mock service for improved modularity. Below are the most significant changes grouped by theme:

SonarQube Integration:

  • Added a new GitHub Actions workflow (.github/workflows/sonarqube.yml) to run SonarQube scans, including steps for building the project, running tests, generating coverage reports, and uploading them to SonarCloud.
  • Introduced sonar-project.properties to configure SonarQube for the project, specifying source and test locations, coverage report paths, exclusions, and encoding settings.

Test Resource Management:

  • Updated Package.swift to include test resources (Mock/User.json and Mock/Environment.json) in the FormbricksSDKTests target.

Mock Service Refactoring:

  • Renamed Tests/FormbricksSDKTests/Mock/MockFormbricksService.swift to Tests/FormbricksSDKTests/MockFormbricksService/MockFormbricksService.swift for better organization.
  • Modified MockFormbricksService to use Bundle.module for loading mock JSON files, aligning with Swift Package Manager conventions.

@pandeymangg pandeymangg requested review from Copilot and mattinannt May 14, 2025 11:29
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request integrates SonarQube for code quality analysis, enhances test resource management, and refactors the mock service for improved modularity.

  • Adds a GitHub Actions workflow and sonar-project.properties for SonarQube integration.
  • Updates Package.swift to include test resource files.
  • Modifies the mock service to use Bundle.module for improved resource loading.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
sonar-project.properties Introduces SonarQube configuration settings for sources, tests, and coverage.
Tests/FormbricksSDKTests/MockFormbricksService/MockFormbricksService.swift Refactors mock service to use Bundle.module when loading JSON resources.
Package.swift Updates test target to process resource files for tests.
.github/workflows/sonarqube.yml Adds a workflow to run SonarQube scans with GitHub Actions.

Copy link

@pandeymangg pandeymangg added this pull request to the merge queue May 15, 2025
Merged via the queue into main with commit d00d076 May 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants