Skip to content

Commit 7d96b81

Browse files
committed
fixups
1 parent 1b23bd9 commit 7d96b81

File tree

4 files changed

+31
-123
lines changed

4 files changed

+31
-123
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ concurrency:
2424
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
2525
permissions:
2626
contents: read
27+
pull-requests: write
2728
jobs:
2829
build:
2930
runs-on: ubuntu-24.04
@@ -48,4 +49,25 @@ jobs:
4849
uses: ./.github/actions/install-nonoss
4950
- name: Noredist Build
5051
run: |
51-
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)
52+
mvn -B -P developer,systemvm,quality -Dsimulator -Dnoredist clean install -T$(nproc)
53+
- name: Upload to SonarQube
54+
if: github.repository == 'apache/cloudstack' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
58+
PR_ID: ${{ github.event.pull_request.number }}
59+
HEADREF: ${{ github.event.pull_request.head.ref }}
60+
run: |
61+
if [ "${{ github.event_name }}" == "pull_request" ]; then
62+
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
63+
else
64+
mvn -B -P quality org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.branch.name=${{ github.ref_name }}
65+
fi
66+
- uses: codecov/codecov-action@v4
67+
with:
68+
files: ./client/target/site/jacoco-aggregate/jacoco.xml
69+
fail_ci_if_error: true
70+
flags: unittests
71+
verbose: true
72+
name: codecov
73+
token: ${{ secrets.CODECOV_TOKEN }}

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

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/pre-commit.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,17 @@ jobs:
3333
steps:
3434
- name: Check Out
3535
uses: actions/checkout@v6
36+
- name: Set up Python
37+
uses: actions/setup-python@v6
38+
with:
39+
python-version: '3.11'
40+
cache: 'pip'
3641
- name: Install
37-
run: |
38-
python -m pip install --upgrade pip
39-
pip install pre-commit
42+
run: pip install pre-commit
4043
- name: Set PY
4144
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
42-
- uses: actions/cache@v5
45+
- name: Cache pre-commit environments
46+
uses: actions/cache@v5
4347
with:
4448
path: ~/.cache/pre-commit
4549
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

.github/workflows/sonar-check.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)