From b602a4cd5d4c0836ac4f106dfd77d8e7f3463b49 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 16 Jun 2023 18:00:40 +0200 Subject: [PATCH] Restore sonar task on PR, we want to have sonarcloud comment on PR to track code quality (#619) --- .github/workflows/tests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aea05b5a22..3e9dbab5c6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,8 +81,12 @@ jobs: **/out/failures/ **/build/reports/tests/*UnitTest/ - - name: 🔊 Publish results to Sonar (disabled) - run: echo "This is now done only once a day, see nightlyReports.yml" + - name: 🔊 Publish results to Sonar + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }} + if: ${{ always() && env.SONAR_TOKEN != '' && env.ORG_GRADLE_PROJECT_SONAR_LOGIN != '' }} + run: ./gradlew sonar $CI_GRADLE_ARG_PROPERTIES # https://github.com/codecov/codecov-action - name: ☂️ Upload coverage reports to codecov