mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-25 14:56:18 +08:00
Test build-scan capture with pre-existing GUH
This commit is contained in:
parent
06d64212d3
commit
755aebc7d1
24
.github/workflows/integTest-caching-config.yml
vendored
24
.github/workflows/integTest-caching-config.yml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
# Use the same configuration when restoring state from cache
|
# Use the same configuration as used in the seed build
|
||||||
gradle-home-cache-includes: |
|
gradle-home-cache-includes: |
|
||||||
caches
|
caches
|
||||||
enterprise
|
enterprise
|
||||||
@ -57,6 +57,7 @@ jobs:
|
|||||||
working-directory: __tests__/samples/groovy-dsl
|
working-directory: __tests__/samples/groovy-dsl
|
||||||
run: ./gradlew test --offline
|
run: ./gradlew test --offline
|
||||||
|
|
||||||
|
# Test that build scans are captured when caching is explicitly disabled
|
||||||
cache-disabled:
|
cache-disabled:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@ -79,3 +80,24 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('No build scan detected')
|
core.setFailed('No build scan detected')
|
||||||
|
|
||||||
|
# Test that build scans are captured when caching is disabled because Gradle User Home already exists
|
||||||
|
cache-disabled-pre-existing-gradle-home:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Create dummy Gradle User Home
|
||||||
|
run: mkdir -p ~/.gradle/caches
|
||||||
|
- name: Setup Gradle
|
||||||
|
uses: ./
|
||||||
|
- 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')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user