mirror of
https://github.com/gradle/gradle-build-action
synced 2024-11-30 13:32:32 +00:00
Combine all integTest workflows into 2 workflow runs
- Workflow to run all integTest workflows, allowing use of prior cache entries - Workflow that starts with empty cache Both of these use workflow_call to combine the existing workflows.
This commit is contained in:
parent
2e34e4f80f
commit
c838a38ea1
17 changed files with 180 additions and 127 deletions
63
.github/workflows/ci-full-check.yml
vendored
Normal file
63
.github/workflows/ci-full-check.yml
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
name: Run integration tests starting with empty cache
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
branches: [ main, dd/dpe-main ]
|
||||
|
||||
jobs:
|
||||
action-inputs:
|
||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
caching-config:
|
||||
uses: ./.github/workflows/integ-test-action-inputs-caching.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
execution-with-caching:
|
||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
execution:
|
||||
uses: ./.github/workflows/integ-test-execution.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
gradle-versions:
|
||||
uses: ./.github/workflows/integ-test-gradle-versions.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-configuration-cache:
|
||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-custom-gradle-home:
|
||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-gradle-home:
|
||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-java-toolchain:
|
||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
sample-kotlin-dsl:
|
||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
sample-gradle-plugin:
|
||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
40
.github/workflows/ci-quick-check.yml
vendored
Normal file
40
.github/workflows/ci-quick-check.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: Run integration tests allowing cache reuse
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
|
||||
jobs:
|
||||
action-inputs:
|
||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||
|
||||
caching-config:
|
||||
uses: ./.github/workflows/integ-test-action-inputs-caching.yml
|
||||
|
||||
execution-with-caching:
|
||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||
|
||||
execution:
|
||||
uses: ./.github/workflows/integ-test-execution.yml
|
||||
|
||||
gradle-versions:
|
||||
uses: ./.github/workflows/integ-test-gradle-versions.yml
|
||||
|
||||
restore-configuration-cache:
|
||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
|
||||
restore-custom-gradle-home:
|
||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||
|
||||
restore-gradle-home:
|
||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||
|
||||
restore-java-toolchain:
|
||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||
|
||||
sample-kotlin-dsl:
|
||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||
|
||||
sample-gradle-plugin:
|
||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
|
@ -3,9 +3,6 @@ name: Execute failure cases
|
|||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
|
||||
jobs:
|
||||
|
||||
failing-build:
|
|
@ -1,19 +1,14 @@
|
|||
name: Test caching configuration
|
||||
name: Test action inputs that control caching
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-caching-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
|
@ -111,7 +106,7 @@ jobs:
|
|||
# Test seed the cache with cache-write-only and verify with cache-read-only
|
||||
seed-build-write-only:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-write-only-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only-
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
@ -129,7 +124,7 @@ jobs:
|
|||
|
||||
verify-write-only-build:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-write-only-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-write-only-
|
||||
needs: seed-build-write-only
|
||||
strategy:
|
||||
matrix:
|
|
@ -1,19 +1,15 @@
|
|||
name: Test different action inputs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
action-inputs:
|
|
@ -1,19 +1,15 @@
|
|||
name: Test save/restore Gradle state with direct execution
|
||||
name: Test save/restore Gradle Home with direct execution
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
seed-build:
|
|
@ -1,19 +1,15 @@
|
|||
name: Test Gradle execution
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
# Tests for executing with different Gradle versions.
|
|
@ -1,19 +1,15 @@
|
|||
name: Test provision different Gradle versions
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: gradle-versions-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
# Tests for executing with different Gradle versions.
|
|
@ -1,26 +1,20 @@
|
|||
name: Test save/restore configuration-cache state
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}
|
||||
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-groovy:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-groovy-
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
@ -36,7 +30,7 @@ jobs:
|
|||
|
||||
verify-build-groovy:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-groovy-
|
||||
needs: seed-build-groovy
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -63,7 +57,7 @@ jobs:
|
|||
# Check that the build can run when no extracted cache entries are restored
|
||||
gradle-user-home-not-fully-restored:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-groovy-
|
||||
needs: seed-build-groovy
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -84,7 +78,7 @@ jobs:
|
|||
|
||||
seed-build-kotlin:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-kotlin-
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
|
@ -100,7 +94,7 @@ jobs:
|
|||
|
||||
modify-build-kotlin:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-kotlin-
|
||||
needs: seed-build-kotlin
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -118,7 +112,7 @@ jobs:
|
|||
# Test restore configuration-cache from the third build invocation
|
||||
verify-build-kotlin:
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{ inputs.cache-key-prefix }}-kotlin-
|
||||
needs: modify-build-kotlin
|
||||
strategy:
|
||||
matrix:
|
|
@ -1,24 +1,17 @@
|
|||
name: Test caching with a custom GRADLE_USER_HOME
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_USER_HOME: ${{github.workspace}}/custom/gradle/home
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}
|
||||
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:
|
|
@ -1,19 +1,16 @@
|
|||
name: Test save/restore Gradle Home directory
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-gradle-home-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_JOB: restore-gradle-home
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
seed-build:
|
|
@ -1,19 +1,15 @@
|
|||
name: Test save/restore java toolchains
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-java-toolchain-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
seed-build:
|
|
@ -1,19 +1,14 @@
|
|||
name: Test caching with Gradle Plugin project using TestKit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-gradle-plugin-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
|
@ -42,6 +37,8 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
with:
|
||||
cache-read-only: true
|
||||
- name: Build gradle-plugin project
|
||||
working-directory: .github/workflow-samples/gradle-plugin
|
||||
run: ./gradlew build --offline
|
|
@ -1,19 +1,14 @@
|
|||
name: Test caching with Kotlin DSL
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [assigned, review_requested]
|
||||
push:
|
||||
paths:
|
||||
- '.github/**'
|
||||
- 'dist/**'
|
||||
workflow_call:
|
||||
inputs:
|
||||
cache-key-prefix:
|
||||
type: string
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}
|
||||
|
||||
env:
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
|
||||
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: sample-kotlin-dsl-${{ inputs.cache-key-prefix }}
|
||||
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
|
||||
|
||||
jobs:
|
||||
|
@ -42,6 +37,8 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
- name: Setup Gradle
|
||||
uses: ./
|
||||
with:
|
||||
cache-read-only: true
|
||||
- name: Build kotlin-dsl project
|
||||
working-directory: .github/workflow-samples/kotlin-dsl
|
||||
run: ./gradlew build --offline
|
Loading…
Reference in a new issue