bcgov/Java Unit Test and Analysis with SonarCloud

Run Java unit tests, can analyse with SonarCloud

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jun 25, 2026
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: bcgov/action-test-and-analyse-java@a8e35510683d3d916e4366a44b2d5cb61d0f23fe # v.1.2.0

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
commandsCommands to run tests, start with '|' for multi-lineyes
dirApp/package directoryyes
java-versionJava version, defaults to 17 (LTS)yes
java-cacheJava package manager cache, defaults to mavenmaven
java-distributionJava distribution, defaults to temurintemurin
sonar_argsSonarCloud command line arguments-Dsonar.organization=bcgov-sonarcloud -Dsonar.projectKey=bcgov_${{ github.repository }}
sonar_tokenSonar token, provide unpopulated token for pre-setup (will skip)__OMITTED__
sonar_enforce_complianceFail the build if SonarCloud fails. If false, only warn.true
triggersPaths (array) used to trigger a build; e.g. ('./backend/' './frontend/)
diff_branchBranch to diff against${{ github.event.repository.default_branch }}
repositoryNon-default repository to clone (used for testing this action)${{ github.repository }}
branchNon-default branch to clone (used for testing this action)""
namedescription
triggeredWhether the action was triggered based on path changes