mirror of
https://github.com/gbevin/urlencoder.git
synced 2025-04-24 23:07:12 -07:00
Updated for Sonarcloud
This commit is contained in:
parent
5f4eefc18a
commit
8fc30ed4ad
2 changed files with 38 additions and 5 deletions
34
.github/workflows/gradle.yml
vendored
34
.github/workflows/gradle.yml
vendored
|
@ -27,11 +27,35 @@ jobs:
|
|||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Checkout project sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Cache SonarCloud packages
|
||||
if: matrix.java-version == env.SONAR_JDK
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/gradle-build-action@v2
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ matrix.java-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-${{ matrix.java-version }}-
|
||||
|
||||
- name: Test with Gradle
|
||||
run: ./gradlew build check --stacktrace
|
||||
run: ./gradlew build check --stacktrace
|
||||
|
||||
- name: SonarCloud
|
||||
if: success() && matrix.java-version == env.SONAR_JDK
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: ./gradlew sonarqube --info
|
||||
|
||||
- name: Cleanup Gradle Cache
|
||||
run: |
|
||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||
rm -f ~/.gradle/caches/modules-2/gc.properties
|
Loading…
Add table
Add a link
Reference in a new issue