Updated workflow
This commit is contained in:
parent
6f3b84a7c0
commit
a43d4e0b5d
1 changed files with 6 additions and 20 deletions
26
.github/workflows/gradle.yml
vendored
26
.github/workflows/gradle.yml
vendored
|
@ -15,12 +15,12 @@ jobs:
|
|||
java-version: [ 11, 18 ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v1
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
||||
|
@ -29,23 +29,14 @@ jobs:
|
|||
|
||||
- name: Cache SonarCloud packages
|
||||
if: matrix.java-version == env.SONAR_JDK
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- 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
|
||||
uses: gradle/gradle-build-action@v2
|
||||
env:
|
||||
CI_NAME: "GitHub CI"
|
||||
ALPHAVANTAGE_API_KEY: ${{ secrets.ALPHAVANTAGE_API_KEY }}
|
||||
|
@ -60,8 +51,8 @@ jobs:
|
|||
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
|
||||
MASTODON_HANDLE: ${{ secrets.MASTODON_HANDLE }}
|
||||
MASTODON_INSTANCE: ${{ secrets.MASTODON_INSTANCE }}
|
||||
|
||||
run: ./gradlew build check --stacktrace
|
||||
with:
|
||||
arguments: build check --stacktrace
|
||||
|
||||
- name: SonarCloud
|
||||
if: success() && matrix.java-version == env.SONAR_JDK
|
||||
|
@ -69,8 +60,3 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: ./gradlew sonar
|
||||
|
||||
- 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