Skip to content

Commit

Permalink
Skip the 'download-dist' step for full integ-test
Browse files Browse the repository at this point in the history
After the '[bot] update dist directory' commit, we run a full test suite.
This will now use the content from the 'dist' directory, rather than
regenerating this content in the test.
  • Loading branch information
bigdaz committed Apr 12, 2024
1 parent 0261d93 commit fb14e0e
Show file tree
Hide file tree
Showing 22 changed files with 119 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/actions/init-integ-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:

# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
- name: Download dist
if: ${{ !env.ACT }}
if: ${{ env.SKIP_DIST != 'true' && !env.ACT }}
uses: actions/download-artifact@v4
with:
name: dist
Expand Down
37 changes: 36 additions & 1 deletion .github/workflows/ci-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
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 }}
cache-key-prefix: '0' # TODO DAZ Try this again ${{ steps.determine-suite.outputs.suite == 'quick' && '0' || github.run_number }}
suite: ${{ steps.determine-suite.outputs.suite }}
steps:
- name: Determine suite to run
id: determine-suite
Expand All @@ -43,11 +44,13 @@ jobs:
echo "suite=quick" >> "$GITHUB_OUTPUT"
build-distribution:
needs: [determine-suite]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Build and upload distribution
if: ${{ needs.determine-suite.outputs.suite != 'full' }}
uses: ./.github/actions/build-dist

action-inputs:
Expand All @@ -56,27 +59,31 @@ jobs:
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

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 }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

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
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

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 }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

dependency-graph:
if: ${{ ! github.event.pull_request.head.repo.fork }}
Expand All @@ -87,6 +94,7 @@ jobs:
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

dependency-submission:
if: ${{ ! github.event.pull_request.head.repo.fork }}
Expand All @@ -97,6 +105,7 @@ jobs:
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

dependency-submission-failures:
if: ${{ ! github.event.pull_request.head.repo.fork }}
Expand All @@ -107,27 +116,32 @@ jobs:
with:
runner-os: '${{ needs.determine-suite.outputs.runner-os }}'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

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 }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

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 }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

develocity-injection:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-inject-develocity.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
secrets:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}

Expand All @@ -136,56 +150,77 @@ jobs:
uses: ./.github/workflows/integ-test-provision-gradle-versions.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

restore-configuration-cache:
if: ${{ ! github.event.pull_request.head.repo.fork }}
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-configuration-cache.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
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
with:
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

restore-custom-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-custom-gradle-home.yml
with:
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

restore-gradle-home:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-gradle-home.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

restore-java-toolchain:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-restore-java-toolchain.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

sample-kotlin-dsl:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-sample-kotlin-dsl.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

sample-gradle-plugin:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-sample-gradle-plugin.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

toolchain-detection:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-detect-java-toolchains.yml
with:
runner-os: '["ubuntu-latest"]'
cache-key-prefix: '${{ needs.determine-suite.outputs.cache-key-prefix }}-'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}

wrapper-validation:
needs: [determine-suite, build-distribution]
uses: ./.github/workflows/integ-test-wrapper-validation.yml
with:
runner-os: '["ubuntu-latest"]'
skip-dist: ${{ needs.determine-suite.outputs.suite == 'full' }}
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-action-inputs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: action-inputs-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-build-scan-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: build-scan-publish-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-cache-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: cache-cleanup-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-caching-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: caching-config-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-dependency-graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

permissions:
contents: write

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-graph-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-failures-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

permissions:
contents: write

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: dependency-submission-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-detect-java-toolchains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: detect-java-toolchain-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-execution-with-caching.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-with-caching-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-execution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: execution-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-inject-develocity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false
secrets:
DEVELOCITY_ACCESS_KEY:
required: true

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: inject-develocity-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-provision-gradle-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: provision-gradle-versions-${{ inputs.cache-key-prefix }}
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-restore-configuration-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ on:
runner-os:
type: string
default: '["ubuntu-latest", "windows-latest", "macos-latest"]'
skip-dist:
type: boolean
default: false
secrets:
GRADLE_ENCRYPTION_KEY:
required: true

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-configuration-cache-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:
inputs:
cache-key-prefix:
type: string
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-containerized-gradle-home-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/integ-test-restore-custom-gradle-home.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ on:
inputs:
cache-key-prefix:
type: string
skip-dist:
type: boolean
default: false

env:
SKIP_DIST: ${{ inputs.skip-dist }}
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: restore-custom-gradle-home-${{ inputs.cache-key-prefix }}

jobs:
Expand Down
Loading

0 comments on commit fb14e0e

Please sign in to comment.