Skip to content

Commit 15691ba

Browse files
authored
Merge pull request #7002 from litetex/gh-actions-use-integrated-cache-setup-java
Using integrated cache in ``actions/setup-java``
2 parents a555aab + a825253 commit 15691ba

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,7 @@ jobs:
3838
with:
3939
java-version: 8
4040
distribution: "temurin"
41-
42-
- name: Cache Gradle dependencies
43-
uses: actions/cache@v2
44-
with:
45-
path: ~/.gradle/caches
46-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
47-
restore-keys: ${{ runner.os }}-gradle
41+
cache: 'gradle'
4842

4943
- name: Build debug APK and run jvm tests
5044
run: ./gradlew assembleDebug lintDebug testDebugUnitTest --stacktrace -DskipFormatKtlint
@@ -70,13 +64,7 @@ jobs:
7064
with:
7165
java-version: 8
7266
distribution: "temurin"
73-
74-
- name: Cache Gradle dependencies
75-
uses: actions/cache@v2
76-
with:
77-
path: ~/.gradle/caches
78-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
79-
restore-keys: ${{ runner.os }}-gradle
67+
cache: 'gradle'
8068

8169
- name: Run android tests
8270
uses: reactivecircus/android-emulator-runner@v2
@@ -98,6 +86,7 @@ jobs:
9886
# with:
9987
# java-version: 11 # Sonar requires JDK 11
10088
# distribution: "temurin"
89+
# cache: 'gradle'
10190

10291
# - name: Cache SonarCloud packages
10392
# uses: actions/cache@v2
@@ -106,13 +95,6 @@ jobs:
10695
# key: ${{ runner.os }}-sonar
10796
# restore-keys: ${{ runner.os }}-sonar
10897

109-
# - name: Cache Gradle packages
110-
# uses: actions/cache@v2
111-
# with:
112-
# path: ~/.gradle/caches
113-
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
114-
# restore-keys: ${{ runner.os }}-gradle
115-
11698
# - name: Build and analyze
11799
# env:
118100
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any

0 commit comments

Comments
 (0)