Unverified Commit 4f616f68 authored by Daz DeBoer's avatar Daz DeBoer
Browse files

Include github.run_attempt in test cache keys

This change to the integration tests should properly isolate multiple runs of the same job.
Previously, some jobs would fail if you attempted to re-run them via the UI, because the cache
entries would be re-used from the previous run.
parent 222b7148
Loading
Loading
Loading
Loading
+1 −1
Changes for .github/workflows/failure-cases.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ on:
  workflow_dispatch:

env:
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-

jobs:

+1 −1
Changes for .github/workflows/integTest-action-inputs.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ on:
  workflow_dispatch:

env:
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-

jobs:
  action-inputs:
+1 −1
Changes for .github/workflows/integTest-caching-config.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ on:
  workflow_dispatch:

env:
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-
  GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true

jobs:
+6 −6
Changes for .github/workflows/integTest-caching-configuration-cache.yml: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ jobs:
  # 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}}-groovy-
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
@@ -30,7 +30,7 @@ jobs:

  configuration-cache-groovy:
    env:
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-groovy-
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
    needs: seed-build-groovy
    strategy:
      matrix:
@@ -52,7 +52,7 @@ jobs:
  # Check that the build can run when no extracted cache entries are restored
  no-extracted-cache-entries-restored:
    env:
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-groovy-
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-groovy-
    needs: seed-build-groovy
    strategy:
      matrix:
@@ -73,7 +73,7 @@ jobs:

  seed-build-kotlin:
    env:
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-kotlin-
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
@@ -89,7 +89,7 @@ jobs:

  modify-build-kotlin:
    env:
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-kotlin-
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
    needs: seed-build-kotlin
    strategy:
      matrix:
@@ -107,7 +107,7 @@ jobs:
 # Test restore configuration-cache from the third build invocation
  configuration-cache-kotlin:
    env:
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-kotlin-
      GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-kotlin-
    needs: modify-build-kotlin
    strategy:
      matrix:
+1 −1
Changes for .github/workflows/integTest-caching-gradle-home.yml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ on:
  workflow_dispatch:

env:
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}-
  GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: ${{github.workflow}}#${{github.run_number}}:${{github.run_attempt}}-

jobs:
  seed-build:
Loading