Better local caching via burrunan/gradle-cache-action (#1054)
* Better local caching via burrunan/gradle-cache-action * Add cached debug * Fix yaml * Don't push to remote cache during PR * Polish
This commit is contained in:
parent
9aa64abf63
commit
090cdd782b
|
@ -28,20 +28,14 @@ jobs:
|
|||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Cache gradle dependencies
|
||||
- name: Test
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
with:
|
||||
job-id: jdk${{ matrix.java }}
|
||||
|
||||
- name: Test with Gradle
|
||||
uses: nick-invision/retry@v1
|
||||
env:
|
||||
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
|
||||
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
|
||||
with:
|
||||
command: ./gradlew testJava${{ matrix.java }} --stacktrace
|
||||
timeout_minutes: 60
|
||||
max_attempts: 3
|
||||
job-id: jdk${{ matrix.java }}
|
||||
arguments: testJava${{ matrix.java }} --stacktrace -Dorg.gradle.caching.debug=true
|
||||
|
||||
- name: Aggregate test reports with ciMate
|
||||
if: always()
|
||||
|
@ -63,20 +57,14 @@ jobs:
|
|||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Cache gradle dependencies
|
||||
- name: Test
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
with:
|
||||
job-id: latestDepTest
|
||||
|
||||
- name: Test with Gradle
|
||||
uses: nick-invision/retry@v1
|
||||
arguments: test -PtestLatestDeps=true --stacktrace
|
||||
env:
|
||||
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
|
||||
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
|
||||
with:
|
||||
command: ./gradlew test -PtestLatestDeps=true --stacktrace
|
||||
timeout_minutes: 60
|
||||
max_attempts: 3
|
||||
|
||||
- name: Aggregate test reports with ciMate
|
||||
if: always()
|
||||
|
|
|
@ -24,17 +24,11 @@ jobs:
|
|||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Cache gradle dependencies
|
||||
- name: Test
|
||||
uses: burrunan/gradle-cache-action@v1
|
||||
with:
|
||||
job-id: jdk${{ matrix.java }}
|
||||
|
||||
- name: Test with Gradle
|
||||
uses: nick-invision/retry@v1
|
||||
with:
|
||||
command: ./gradlew testJava${{ matrix.java }} --stacktrace
|
||||
timeout_minutes: 60
|
||||
max_attempts: 3
|
||||
arguments: testJava${{ matrix.java }} --stacktrace
|
||||
|
||||
- name: Aggregate test reports with ciMate
|
||||
if: always()
|
||||
|
|
|
@ -23,7 +23,7 @@ buildCache {
|
|||
remote(com.github.burrunan.s3cache.AwsS3BuildCache) {
|
||||
region = 'us-west-2'
|
||||
bucket = 'opentelemetry-java-instrumentation-gradle-test1'
|
||||
push = System.getenv('S3_BUILD_CACHE_ACCESS_KEY_ID') != null
|
||||
push = isCI && !System.getenv('S3_BUILD_CACHE_ACCESS_KEY_ID')?.isBlank()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue