mirror of
https://github.com/gradle/actions.git
synced 2025-08-27 04:11:28 +08:00
Merge quick and full tests into single workflow
- Run quick suite for Dependabot - Run quick suite in forks - Run quick suite if no PR is associated with commit - Otherwise run full suite
This commit is contained in:
parent
60be407ece
commit
7b822e51a5
140
.github/workflows/ci-integ-test-full.yml
vendored
140
.github/workflows/ci-integ-test-full.yml
vendored
@ -1,140 +0,0 @@
|
||||
name: CI-integ-test-full
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- release/**
|
||||
|
||||
jobs:
|
||||
build-distribution:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
action-inputs:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
build-scan-publish:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
cache-cleanup:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
caching-config:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-caching-config.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
dependency-graph:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-dependency-graph.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
dependency-submission:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-dependency-submission.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
dependency-submission-failures:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
execution-with-caching:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
execution:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-execution.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
develocity-injection:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
secrets:
|
||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
||||
|
||||
provision-gradle-versions:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-configuration-cache:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
|
||||
restore-custom-gradle-home:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-containerized-gradle-home:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-gradle-home:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
restore-java-toolchain:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
sample-kotlin-dsl:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
sample-gradle-plugin:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
||||
|
||||
toolchain-detection:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
||||
with:
|
||||
cache-key-prefix: ${{github.run_number}}-
|
151
.github/workflows/ci-integ-test-quick.yml
vendored
151
.github/workflows/ci-integ-test-quick.yml
vendored
@ -1,151 +0,0 @@
|
||||
name: CI-integ-test-quick
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches-ignore:
|
||||
- main
|
||||
- release/**
|
||||
|
||||
jobs:
|
||||
check-for-pr:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
is-pr-commit: ${{ steps.PR.outputs.pr_found }}
|
||||
steps:
|
||||
- name: Get current PR details
|
||||
uses: 8BitJonny/gh-get-current-pr@3.0.0
|
||||
id: PR
|
||||
|
||||
build-distribution:
|
||||
needs: check-for-pr
|
||||
if: ${{ needs.check-for-pr.outputs.is-pr-commit == 'false' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
action-inputs:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
build-scan-publish:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
cache-cleanup:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
cache-key-prefix: ${{github.run_number}}- # Requires a fresh cache entry each run
|
||||
|
||||
caching-config:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-caching-config.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
dependency-graph:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-dependency-graph.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
dependency-submission:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-dependency-submission.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
dependency-submission-failures:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
execution-with-caching:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
execution:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-execution.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
develocity-injection:
|
||||
if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }}
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
secrets:
|
||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
||||
|
||||
provision-gradle-versions:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
restore-configuration-cache:
|
||||
if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }}
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
|
||||
restore-containerized-gradle-home:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
||||
|
||||
restore-custom-gradle-home:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||
|
||||
restore-gradle-home:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
restore-java-toolchain:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
sample-kotlin-dsl:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
sample-gradle-plugin:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
toolchain-detection:
|
||||
needs: build-distribution
|
||||
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
181
.github/workflows/ci-integ-test.yml
vendored
Normal file
181
.github/workflows/ci-integ-test.yml
vendored
Normal file
@ -0,0 +1,181 @@
|
||||
name: CI-integ-test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
determine-suite:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
runner-os: ${{ steps.determine-suite.outputs.suite == 'quick' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest", "macos-latest"]' }}
|
||||
cache-key-prefix: ${{ steps.determine-suite.outputs.suite == 'quick' && '0' || github.run_number }}
|
||||
steps:
|
||||
- name: Get current PR details
|
||||
uses: 8BitJonny/gh-get-current-pr@3.0.0
|
||||
id: PR
|
||||
- name: Determine suite to run
|
||||
id: determine-suite
|
||||
run: |
|
||||
# Always run quick suite if we are not in the core `gradle/actions` repository
|
||||
# This reduces the load for developers working on forks
|
||||
if [ "${{ github.repository }}" != "gradle/actions" ]; then
|
||||
echo "Not in core repository: suite=quick"
|
||||
echo "suite=quick" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Always run quick suite for dependabot PRs
|
||||
if [ "${{ github.actor }}" == "dependabot[bot]" ]; then
|
||||
echo "Dependabot: suite=quick"
|
||||
echo "suite=quick" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Run full suite for PRs
|
||||
if [ "${{ steps.PR.outputs.pr_found }}" == "false" ]; then
|
||||
echo "PR not found: suite=quick"
|
||||
echo "suite=quick" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "PR found: suite=full"
|
||||
echo "suite=full" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
build-distribution:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
- name: Build and upload distribution
|
||||
uses: ./.github/actions/build-dist
|
||||
|
||||
action-inputs:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-action-inputs.yml
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
build-scan-publish:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-build-scan-publish.yml
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
cache-cleanup:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{github.run_number}}-' # Requires a fresh cache entry each run
|
||||
|
||||
caching-config:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-caching-config.yml
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
dependency-graph:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-dependency-graph.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
dependency-submission:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-dependency-submission.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
dependency-submission-failures:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-dependency-submission-failures.yml
|
||||
permissions:
|
||||
contents: write
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
execution-with-caching:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-execution-with-caching.yml
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
execution:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-execution.yml
|
||||
with:
|
||||
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
|
||||
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
|
||||
|
||||
develocity-injection:
|
||||
if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }}
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-inject-develocity.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
secrets:
|
||||
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
|
||||
|
||||
provision-gradle-versions:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
restore-configuration-cache:
|
||||
if: ${{ vars.HAS_GRADLE_ACTIONS_SECRETS == 'true' }}
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
secrets:
|
||||
GRADLE_ENCRYPTION_KEY: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
||||
|
||||
restore-containerized-gradle-home:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-restore-containerized-gradle-home.yml
|
||||
|
||||
restore-custom-gradle-home:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
|
||||
|
||||
restore-gradle-home:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
restore-java-toolchain:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
sample-kotlin-dsl:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
sample-gradle-plugin:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
||||
|
||||
toolchain-detection:
|
||||
needs: [determine-suite, build-distribution]
|
||||
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
|
||||
with:
|
||||
runner-os: '["ubuntu-latest"]'
|
Loading…
x
Reference in New Issue
Block a user