You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2022/04/26 09:13:41 UTC
[cloudstack] branch main updated: .github: enable PR sonar integration
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 7233c38567 .github: enable PR sonar integration
7233c38567 is described below
commit 7233c38567d0666592283eb2a0647cf31a7e9464
Author: Rohit Yadav <ro...@shapeblue.com>
AuthorDate: Tue Apr 26 14:43:23 2022 +0530
.github: enable PR sonar integration
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>
---
.github/workflows/coverage-check.yml | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/coverage-check.yml b/.github/workflows/coverage-check.yml
index fc53ae1408..8667583aa0 100644
--- a/.github/workflows/coverage-check.yml
+++ b/.github/workflows/coverage-check.yml
@@ -66,13 +66,31 @@ jobs:
java-version: '11'
cache: 'maven'
+ - name: Cache SonarCloud packages
+ uses: actions/cache@v3
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+
+ - name: Cache local Maven repository
+ uses: actions/cache@v3
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-m2
+
- name: Run Build and Tests with Coverage
id: coverage
if: steps.java-changes.outputs.any_changed == 'true'
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
cd nonoss && bash -x install-non-oss.sh && cd ..
- mvn -P quality -Dsimulator -Dnoredist clean install
+ mvn -P quality -Dsimulator -Dnoredist clean verify install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apachecloudstack
echo "COVERAGE<<EOF" >> $GITHUB_ENV
for file in ${{ steps.java-changes.outputs.all_changed_files }}; do