From e06342eacfe7816e6baf5e894401e42bca427131 Mon Sep 17 00:00:00 2001 From: XiangRongLin <41164160+XiangRongLin@users.noreply.github.com> Date: Sun, 19 Dec 2021 12:18:37 +0100 Subject: [PATCH] Readd sonar CI job --- .github/workflows/ci.yml | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b87219f4f..c0ca24abb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,29 +74,29 @@ jobs: emulator-build: 7425822 script: ./gradlew connectedCheck -# sonar: -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v2 -# with: -# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + sonar: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis -# - name: Set up JDK 11 -# uses: actions/setup-java@v2 -# with: -# java-version: 11 # Sonar requires JDK 11 -# distribution: "temurin" -# cache: 'gradle' + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: 11 # Sonar requires JDK 11 + distribution: "temurin" + cache: 'gradle' -# - name: Cache SonarCloud packages -# uses: actions/cache@v2 -# with: -# path: ~/.sonar/cache -# key: ${{ runner.os }}-sonar -# restore-keys: ${{ runner.os }}-sonar + - name: Cache SonarCloud packages + uses: actions/cache@v2 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar -# - name: Build and analyze -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any -# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} -# run: ./gradlew build sonarqube --info + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./gradlew build sonarqube --info