mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
[CI] Use built-in caching from setup-java
action
https://github.com/actions/setup-java#caching-packages-dependencies: > `setup-java` action has a built-in functionality for caching and restoring dependencies. It uses actions/cache under hood for caching dependencies but requires less configuration settings.
This commit is contained in:
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -19,21 +19,12 @@ jobs:
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Generate cache key
|
||||
run: ./.github/workflows/checksum.sh checksum.txt
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('checksum.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Configure JDK
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '18'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Test
|
||||
run: ./gradlew build check --stacktrace -PkotlinTestMode=${{ matrix.kotlin-test-mode }}
|
||||
|
Reference in New Issue
Block a user