mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-08 01:06:12 +02:00
Update most test workflows to separate config from execution
This commit is contained in:
parent
0e8b9655a0
commit
e977669c8c
7 changed files with 154 additions and 76 deletions
20
.github/workflows/integTest-caching-config.yml
vendored
20
.github/workflows/integTest-caching-config.yml
vendored
|
@ -11,8 +11,6 @@ env:
|
|||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
# Run initial Gradle builds to push initial cache entries
|
||||
# These builds should start fresh without cache hits, due to the seed injected into the cache key above.
|
||||
seed-build:
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -21,11 +19,9 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Build using Gradle wrapper
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
with:
|
||||
build-root-directory: __tests__/samples/groovy-dsl
|
||||
arguments: test
|
||||
# Add "wrapper" to main cache entry and remove 'wrapper-zips' cache entry
|
||||
# Exclude build-cache from main cache entry
|
||||
gradle-home-cache-includes: |
|
||||
|
@ -41,6 +37,9 @@ jobs:
|
|||
["instrumented-jars", "caches/jars-*/*/"],
|
||||
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
||||
]
|
||||
- name: Build using Gradle wrapper
|
||||
working-directory: __tests__/samples/groovy-dsl
|
||||
run: ./gradlew test
|
||||
|
||||
# Test that the gradle-user-home cache will cache dependencies, by running build with --offline
|
||||
verify-build:
|
||||
|
@ -52,13 +51,10 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
- name: Execute Gradle build with --offline
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
with:
|
||||
build-root-directory: __tests__/samples/groovy-dsl
|
||||
arguments: test --offline
|
||||
cache-read-only: true
|
||||
# Need the same configuration when restoring state from cache
|
||||
# Use the same configuration when restoring state from cache
|
||||
gradle-home-cache-includes: |
|
||||
caches
|
||||
notifications
|
||||
|
@ -72,5 +68,9 @@ jobs:
|
|||
["instrumented-jars", "caches/jars-*/*/"],
|
||||
["kotlin-dsl", "caches/*/kotlin-dsl/*/*/"]
|
||||
]
|
||||
cache-read-only: true
|
||||
- name: Execute Gradle build with --offline
|
||||
working-directory: __tests__/samples/groovy-dsl
|
||||
run: ./gradlew test --offline
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue