Skip to content

Commit

Permalink
Update integ test for config-cache caching
Browse files Browse the repository at this point in the history
- Rename test for clarity
- Use cache-encryption-secret in config-cache test
  • Loading branch information
bigdaz committed Dec 21, 2023
1 parent 877ffc8 commit 9687f75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-full-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cache-key-prefix: ${{github.run_number}}-

caching-config:
uses: ./.github/workflows/integ-test-action-inputs-caching.yml
uses: ./.github/workflows/integ-test-caching-config.yml
with:
cache-key-prefix: ${{github.run_number}}-

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-quick-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

caching-config:
needs: build-distribution
uses: ./.github/workflows/integ-test-action-inputs-caching.yml
uses: ./.github/workflows/integ-test-caching-config.yml
with:
runner-os: '["ubuntu-latest"]'
download-dist: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test action inputs for caching
name: Test caching configuration

on:
workflow_call:
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
# Exclude build-cache from main cache entry
gradle-home-cache-excludes: |
caches/build-cache-*
caches/*/executionHistory/**
caches/*/executionHistory
- name: Build using Gradle wrapper
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test
Expand All @@ -65,7 +65,7 @@ jobs:
enterprise
gradle-home-cache-excludes: |
caches/build-cache-*
caches/*/executionHistory/**
caches/*/executionHistory
cache-read-only: true
- name: Execute Gradle build with --offline
working-directory: .github/workflow-samples/groovy-dsl
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/integ-test-restore-configuration-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
uses: ./
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-secret: abcde12345
- name: Groovy build with configuration-cache enabled
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --configuration-cache
Expand All @@ -55,6 +56,7 @@ jobs:
uses: ./
with:
cache-read-only: true
cache-encryption-secret: abcde12345
- name: Groovy build with configuration-cache enabled
id: execute
working-directory: .github/workflow-samples/groovy-dsl
Expand Down Expand Up @@ -88,6 +90,7 @@ jobs:
GRADLE_BUILD_ACTION_SKIP_RESTORE: "generated-gradle-jars|wrapper-zips|java-toolchains|instrumented-jars|dependencies|kotlin-dsl"
with:
cache-read-only: true
cache-encryption-secret: abcde12345
- name: Check execute Gradle build with configuration cache enabled (but not restored)
working-directory: .github/workflow-samples/groovy-dsl
run: ./gradlew test --configuration-cache
Expand All @@ -108,6 +111,7 @@ jobs:
uses: ./
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-secret: abcde12345
- name: Execute 'help' with configuration-cache enabled
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew help --configuration-cache
Expand All @@ -129,6 +133,7 @@ jobs:
uses: ./
with:
cache-read-only: false # For testing, allow writing cache entries on non-default branches
cache-encryption-secret: abcde12345
- name: Execute 'test' with configuration-cache enabled
working-directory: .github/workflow-samples/kotlin-dsl
run: ./gradlew test --configuration-cache
Expand All @@ -151,6 +156,7 @@ jobs:
uses: ./
with:
cache-read-only: true
cache-encryption-secret: abcde12345
- name: Execute 'test' again with configuration-cache enabled
id: execute
working-directory: .github/workflow-samples/kotlin-dsl
Expand Down

0 comments on commit 9687f75

Please sign in to comment.