1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-11-05 01:26:23 +00:00

Merge pull request #7552 from XiangRongLin/readd_sonar

Readd sonar CI job
This commit is contained in:
XiangRongLin 2021-12-20 03:32:28 -05:00 committed by GitHub
commit 96eb1425f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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