SBCOSS-519 : Sunbird-Lern - data-pipeline - add the GitHub actions to run test cases and code quality checks when a PR raised#204
Merged
pallakartheekreddy merged 10 commits intorelease-8.0.0from Jun 23, 2025
Conversation
-the blob URL's which were in the configurations had been deleted so made the config values of test cases to be picked from env
- some of the blob values were still hardcoded and that was causing test cases to fail so made those values to be picked from configurations - the configurations of the test cases will be now picked from env
- some of the blob values were still hardcoded and that was causing test cases to fail so made those values to be picked from configurations - the configurations of the test cases will be now picked from env
…ity checks for qrcode-image-generator flink job
…ity checks for qrcode-image-generator flink job
…ity checks for qrcode-image-generator flink job
…ity checks for data-pipeline flink job
…ity checks for data-pipeline flink jobs
…ity checks for data-pipeline flink jobs
…ity checks for data-pipeline flink jobs
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a GitHub Actions workflow to automate building, testing, coverage reporting (via JaCoCo), and SonarQube analysis on every pull request, and refactors existing tests to load resource URLs and schema paths from a shared base-test.conf configuration.
- Parameterized test URLs and schema base path via
base-test.confinstead of hardcoded values. - Updated
HTTPUtilSpecandDefinitionCacheTestSpecto load configuration entries. - Added
pr-actions.ymlworkflow for PR triggers, Maven caching, test reports, and SonarCloud analysis.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| jobs-core/src/test/scala/org/sunbird/spec/HTTPUtilSpec.scala | Swapped hardcoded blob URLs for imagePath/videoPath from config |
| jobs-core/src/test/scala/org/sunbird/spec/DefinitionCacheTestSpec.scala | Swapped hardcoded schema path for schema.basePath from config |
| jobs-core/src/test/resources/base-test.conf | Added optional env var keys for schema.basePath, contentImagePath, and contentVideoPath |
| .github/workflows/pr-actions.yml | New workflow for building, testing, coverage, and SonarQube on PRs |
Comments suppressed due to low confidence (3)
jobs-core/src/test/scala/org/sunbird/spec/HTTPUtilSpec.scala:62
- [nitpick] Duplicate test description
downloadFilemay cause ambiguity in test reports; consider giving each test a unique description.
"downloadFile" should "download file with lower case name" in {
.github/workflows/pr-actions.yml:122
- [nitpick] The workflow repeats very similar steps across multiple jobs; consider using YAML anchors or a composite action to DRY up the configuration and ease future maintenance.
# Parallel jobs: The following jobs run in parallel after the first job completes
jobs-core/src/test/scala/org/sunbird/spec/DefinitionCacheTestSpec.scala:10
- Missing import statements for
ConfigandConfigFactory; addimport com.typesafe.config.{Config, ConfigFactory}so the test compiles successfully.
val config: Config = ConfigFactory.load("base-test.conf")
pallakartheekreddy
approved these changes
Jun 23, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


This PR adds a GitHub Actions workflow for PR code coverage and quality checks to the
data-pipelinerepository.PR Code Coverage
This workflow ensures that every proposed change is validated for code quality and coverage before merging.
Description by Korbit AI
What change is being made?
Add GitHub Actions to execute test cases and perform code quality checks using SonarQube analysis when a pull request is raised in the "Sunbird-Lern" data-pipeline project.
Why are these changes being made?
These changes are implemented to automate the testing and code quality verification process, ensuring better reliability and maintainability of the codebase. By using GitHub Actions, we streamline continuous integration by automatically running tests and providing code quality insights, which facilitates faster feedback and improves code quality. Additionally, environment variable configuration is made more flexible by parameterizing paths using external configuration files.