Added Gradle caches setup and cleanup.
This commit is contained in:
parent
e4d3f3f2c4
commit
d2c0e12e1a
1 changed files with 11 additions and 4 deletions
15
.github/workflows/gradle.yml
vendored
15
.github/workflows/gradle.yml
vendored
|
@ -22,11 +22,14 @@ jobs:
|
|||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v1
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Test with Gradle
|
||||
env:
|
||||
CI_NAME: "GitHub CI"
|
||||
|
@ -43,3 +46,7 @@ jobs:
|
|||
TWITTER_TOKEN: ${{ secrets.TWITTER_TOKEN }}
|
||||
TWITTER_TOKENSECRET: ${{ secrets.TWITTER_TOKENSECRET }}
|
||||
run: ./gradlew check sonarqube
|
||||
- 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