From 97a4d7a5fd8b9d5d87b4bf51ab56a7f7ab8185e6 Mon Sep 17 00:00:00 2001 From: Daz DeBoer Date: Mon, 17 Jan 2022 12:09:38 -0700 Subject: [PATCH] Test build-scan capture works with cache-disabled --- .../workflows/integTest-caching-config.yml | 23 ++++++++++++++++++- .../integTest-caching-configuration-cache.yml | 6 ++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integTest-caching-config.yml b/.github/workflows/integTest-caching-config.yml index 61c7cff..1bd9bba 100644 --- a/.github/workflows/integTest-caching-config.yml +++ b/.github/workflows/integTest-caching-config.yml @@ -57,4 +57,25 @@ jobs: working-directory: __tests__/samples/groovy-dsl 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') diff --git a/.github/workflows/integTest-caching-configuration-cache.yml b/.github/workflows/integTest-caching-configuration-cache.yml index e63b6d4..ad65c03 100644 --- a/.github/workflows/integTest-caching-configuration-cache.yml +++ b/.github/workflows/integTest-caching-configuration-cache.yml @@ -83,7 +83,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Gradle uses: ./ - - name: Kotlin build with configuration-cache enabled + - name: Execute 'help' with configuration-cache enabled working-directory: __tests__/samples/kotlin-dsl run: ./gradlew help --configuration-cache @@ -100,7 +100,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Gradle uses: ./ - - name: Kotlin build with configuration-cache enabled + - name: Execute 'test' with configuration-cache enabled working-directory: __tests__/samples/kotlin-dsl run: ./gradlew test --configuration-cache @@ -120,7 +120,7 @@ jobs: uses: ./ with: cache-read-only: true - - name: Execute Gradle build and verify cached configuration + - name: Execute 'test' again and verify cached configuration env: VERIFY_CACHED_CONFIGURATION: true working-directory: __tests__/samples/kotlin-dsl