mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 17:12:51 +00:00
Test build-scan capture works with cache-disabled
This commit is contained in:
parent
a7260b277e
commit
97a4d7a5fd
2 changed files with 25 additions and 4 deletions
23
.github/workflows/integTest-caching-config.yml
vendored
23
.github/workflows/integTest-caching-config.yml
vendored
|
@ -57,4 +57,25 @@ jobs:
|
||||||
working-directory: __tests__/samples/groovy-dsl
|
working-directory: __tests__/samples/groovy-dsl
|
||||||
run: ./gradlew test --offline
|
run: ./gradlew test --offline
|
||||||
|
|
||||||
|
cache-disabled:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
cache-disabled: true
|
||||||
|
- name: Run Gradle build
|
||||||
|
id: gradle
|
||||||
|
working-directory: __tests__/samples/no-wrapper${{ matrix.build-root-suffix }}
|
||||||
|
run: gradle help "-DgradleVersionCheck=${{matrix.gradle}}"
|
||||||
|
- name: Check build scan url is captured
|
||||||
|
if: ${{ !steps.gradle.outputs.build-scan-url }}
|
||||||
|
uses: actions/github-script@v3
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
core.setFailed('No build scan detected')
|
||||||
|
|
|
@ -83,7 +83,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
- name: Kotlin build with configuration-cache enabled
|
- name: Execute 'help' with configuration-cache enabled
|
||||||
working-directory: __tests__/samples/kotlin-dsl
|
working-directory: __tests__/samples/kotlin-dsl
|
||||||
run: ./gradlew help --configuration-cache
|
run: ./gradlew help --configuration-cache
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
- name: Kotlin build with configuration-cache enabled
|
- name: Execute 'test' with configuration-cache enabled
|
||||||
working-directory: __tests__/samples/kotlin-dsl
|
working-directory: __tests__/samples/kotlin-dsl
|
||||||
run: ./gradlew test --configuration-cache
|
run: ./gradlew test --configuration-cache
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ jobs:
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
cache-read-only: true
|
cache-read-only: true
|
||||||
- name: Execute Gradle build and verify cached configuration
|
- name: Execute 'test' again and verify cached configuration
|
||||||
env:
|
env:
|
||||||
VERIFY_CACHED_CONFIGURATION: true
|
VERIFY_CACHED_CONFIGURATION: true
|
||||||
working-directory: __tests__/samples/kotlin-dsl
|
working-directory: __tests__/samples/kotlin-dsl
|
||||||
|
|
Loading…
Reference in a new issue