@@ -26,7 +26,6 @@ concurrency:
2626 cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
2727jobs :
2828 build :
29- if : github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
3029 name : Sonar JaCoCo Coverage
3130 runs-on : ubuntu-24.04
3231 steps :
3534 fetch-depth : 0
3635 - name : Setup Environment
3736 uses : ./.github/actions/setup-env
37+ with :
38+ install-python : ' true'
39+ install-apt-deps : ' true'
3840 - name : Cache SonarCloud packages
3941 uses : actions/cache@v5
4042 with :
@@ -44,14 +46,17 @@ jobs:
4446 - name : Install Non-OSS
4547 uses : ./.github/actions/install-nonoss
4648 - name : Run Build and Tests with Coverage
49+ run : mvn -B -T$(nproc) -P developer,systemvm,quality -Dsimulator -Dnoredist clean install
50+ - name : Upload to SonarQube
51+ if : github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
4752 env :
4853 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4954 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
5055 PR_ID : ${{ github.event.pull_request.number }}
5156 HEADREF : ${{ github.event.pull_request.head.ref }}
5257 run : |
53- mvn -T$(nproc) -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key="$PR_ID" -Dsonar.pullrequest.branch="$HEADREF" -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
54- - uses : codecov/codecov-action@v5
58+ mvn -B -P quality org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key="$PR_ID" -Dsonar.pullrequest.branch="$HEADREF" -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
59+ - uses : codecov/codecov-action@v4
5560 with :
5661 files : ./client/target/site/jacoco-aggregate/jacoco.xml
5762 fail_ci_if_error : true
0 commit comments