|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Sonar Quality Check (Main) |
| 19 | +permissions: |
| 20 | + contents: read |
| 21 | +on: |
| 22 | + push: |
| 23 | + branches: |
| 24 | + - main |
| 25 | +concurrency: |
| 26 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 27 | + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 28 | +jobs: |
| 29 | + build: |
| 30 | + if: github.repository == 'apache/cloudstack' |
| 31 | + name: Sonar JaCoCo Coverage |
| 32 | + runs-on: ubuntu-24.04 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v6 |
| 35 | + with: |
| 36 | + fetch-depth: 0 |
| 37 | + - name: Setup Environment |
| 38 | + uses: ./.github/actions/setup-env |
| 39 | + - name: Cache SonarCloud packages |
| 40 | + uses: actions/cache@v5 |
| 41 | + with: |
| 42 | + path: ~/.sonar/cache |
| 43 | + key: ${{ runner.os }}-sonar |
| 44 | + restore-keys: ${{ runner.os }}-sonar |
| 45 | + - name: Install Non-OSS |
| 46 | + uses: ./.github/actions/install-nonoss |
| 47 | + - name: Run Build and Tests with Coverage |
| 48 | + run: | |
| 49 | + mvn -T$(nproc) -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack |
0 commit comments