Skip to content

Commit 59e1c0b

Browse files
chore: remove Sonar workflow changes from refactor
1 parent 3a32947 commit 59e1c0b

1 file changed

Lines changed: 5 additions & 21 deletions

File tree

‎.github/workflows/sonar-check.yml‎

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ jobs:
4747
- name: Install Non-OSS
4848
uses: ./.github/actions/install-nonoss
4949
- name: Run Build and Tests with Coverage
50-
env:
51-
NODE_OPTIONS: "--max-old-space-size=4096"
5250
run: mvn -B -T$(nproc) -P developer,systemvm,quality -Dsimulator -Dnoredist clean install
5351
- name: Upload to SonarQube
5452
if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
@@ -58,15 +56,7 @@ jobs:
5856
PR_ID: ${{ github.event.pull_request.number }}
5957
HEADREF: ${{ github.event.pull_request.head.ref }}
6058
run: |
61-
mvn -B -P quality org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
62-
-Dsonar.projectKey=apache_cloudstack \
63-
-Dsonar.pullrequest.key="$PR_ID" \
64-
-Dsonar.pullrequest.branch="$HEADREF" \
65-
-Dsonar.pullrequest.base=main \
66-
-Dsonar.sources=. \
67-
-Dsonar.projectBaseDir=/home/runner/work/cloudstack/cloudstack \
68-
-Dsonar.java.binaries=/home/runner/work/cloudstack/cloudstack/target/classes \
69-
-Dsonar.exclusions=**/*.js
59+
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
7060
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
7161
with:
7262
files: ./client/target/site/jacoco-aggregate/jacoco.xml
@@ -79,25 +69,19 @@ jobs:
7969
id: grade
8070
run: bash scripts/coverage-grade.sh client/target/site/jacoco-aggregate/jacoco.xml
8171
- name: Post Coverage Grade Comment on PR
82-
if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository && steps.grade.outputs.coverage_grade != ''
8372
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
8473
with:
8574
github-token: ${{ secrets.GITHUB_TOKEN }}
8675
script: |
87-
const grade = '${{ steps.grade.outputs.coverage_grade || 'N/A' }}';
88-
const label = '${{ steps.grade.outputs.coverage_grade_label || 'Unknown' }}';
89-
const linePct = '${{ steps.grade.outputs.line_coverage || 'N/A' }}';
90-
const branchPct = '${{ steps.grade.outputs.branch_coverage || 'N/A' }}';
76+
const grade = '${{ steps.grade.outputs.coverage_grade }}';
77+
const label = '${{ steps.grade.outputs.coverage_grade_label }}';
78+
const linePct = '${{ steps.grade.outputs.line_coverage }}';
79+
const branchPct = '${{ steps.grade.outputs.branch_coverage }}';
9180
const emojiMap = { A: '🟢', B: '🟡', C: '🟠', D: '🔴', F: '⛔' };
9281
const emoji = emojiMap[grade] ?? '❓';
9382
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
9483
const marker = '<!-- coverage-grade-bot -->';
9584
96-
if (!grade || grade === 'N/A') {
97-
console.log('Coverage grade not available, skipping comment');
98-
return;
99-
}
100-
10185
const branchRow = branchPct !== 'N/A'
10286
? `| Branch coverage | **${branchPct}%** |`
10387
: '';

0 commit comments

Comments
 (0)