Skip to content

Commit

Permalink
IJMP-1655 Another try to make sonarcloud reports work
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
  • Loading branch information
KUGDev committed Apr 12, 2024
1 parent 87e17f1 commit 270ce87
Showing 1 changed file with 10 additions and 35 deletions.
45 changes: 10 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Build + Test + Verify + Sonar
name: Build + Test + Sonar + Verify

on: [push, workflow_dispatch]

Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*

test:
test_sonar:
needs: [build]
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -113,6 +113,14 @@ jobs:
name: code-coverage-report
path: ${{ github.workspace }}/build/reports/kover/html

- name: SonarCloud scans
continue-on-error: true
uses: ./.github/actions/sonar
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}

verify:
if: ${{ contains(github.ref, 'refs/heads/release/') }}
needs: [build]
Expand Down Expand Up @@ -155,36 +163,3 @@ jobs:
with:
name: plugin-verifier-report
path: ${{ github.workspace }}/build/reports/pluginVerifier

sonar:
needs: [test]
runs-on: ubuntu-latest
steps:

- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true

- name: Get tests result from artifacts
uses: actions/download-artifact@v4
with:
name: tests-report
path: ${{ github.workspace }}/build/reports/tests

- name: SonarCloud scans
continue-on-error: true
uses: ./.github/actions/sonar
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}

0 comments on commit 270ce87

Please sign in to comment.