From f6eec43f6ff50b883f31f0851756802ac0611d41 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Tue, 14 Jul 2026 22:20:33 -0400 Subject: [PATCH] Merge cache-dependency-path e2e workflow into e2e-cache Fold the standalone 'Validate cache with cache-dependency-path option' workflow into e2e-cache.yml and delete the separate file. The three gradle1-save/gradle1-restore/gradle2-restore jobs are copied verbatim, preserving their matrix, cache-dependency-path inputs, and needs relationships. No change in test coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 635b89fa-5c35-49e1-a257-dc9001ebb8db --- .../workflows/e2e-cache-dependency-path.yml | 102 ------------------ .github/workflows/e2e-cache.yml | 81 ++++++++++++++ 2 files changed, 81 insertions(+), 102 deletions(-) delete mode 100644 .github/workflows/e2e-cache-dependency-path.yml diff --git a/.github/workflows/e2e-cache-dependency-path.yml b/.github/workflows/e2e-cache-dependency-path.yml deleted file mode 100644 index 1c79c081..00000000 --- a/.github/workflows/e2e-cache-dependency-path.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Validate cache with cache-dependency-path option - -on: - push: - branches: - - main - - releases/* - paths-ignore: - - '**.md' - pull_request: - paths-ignore: - - '**.md' - -permissions: - contents: read - -defaults: - run: - shell: bash - -jobs: - gradle1-save: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - name: Checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: Run setup-java with the cache for gradle - uses: ./ - id: setup-java - with: - distribution: 'adopt' - java-version: '17' - cache: gradle - cache-dependency-path: __tests__/cache/gradle1/*.gradle* - - name: Create files to cache - # Need to avoid using Gradle daemon to stabilize the save process on Windows - # https://github.com/actions/cache/issues/454#issuecomment-840493935 - run: | - gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1 - if [ ! -d ~/.gradle/caches ]; then - echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" - exit 1 - fi - gradle1-restore: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - needs: gradle1-save - steps: - - name: Checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: Run setup-java with the cache for gradle - uses: ./ - id: setup-java - with: - distribution: 'adopt' - java-version: '11' - cache: gradle - cache-dependency-path: __tests__/cache/gradle1/*.gradle* - - name: Confirm that ~/.gradle/caches directory has been made - run: | - if [ ! -d ~/.gradle/caches ]; then - echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" - exit 1 - fi - ls ~/.gradle/caches/ - gradle2-restore: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - needs: gradle1-save - steps: - - name: Checkout - uses: actions/checkout@v7 - with: - persist-credentials: false - - name: Run setup-java with the cache for gradle - uses: ./ - id: setup-java - with: - distribution: 'adopt' - java-version: '11' - cache: gradle - cache-dependency-path: __tests__/cache/gradle2/*.gradle* - - name: Confirm that ~/.gradle/caches directory has not been made - run: | - if [ -d ~/.gradle/caches ]; then - echo "::error::The ~/.gradle/caches directory exists unexpectedly" - exit 1 - fi diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index c76cf50b..36b27b7d 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -222,3 +222,84 @@ jobs: exit 1 fi ls ~/.cache/coursier + gradle1-save: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: Run setup-java with the cache for gradle + uses: ./ + id: setup-java + with: + distribution: 'adopt' + java-version: '17' + cache: gradle + cache-dependency-path: __tests__/cache/gradle1/*.gradle* + - name: Create files to cache + # Need to avoid using Gradle daemon to stabilize the save process on Windows + # https://github.com/actions/cache/issues/454#issuecomment-840493935 + run: | + gradle downloadDependencies --no-daemon -p __tests__/cache/gradle1 + if [ ! -d ~/.gradle/caches ]; then + echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" + exit 1 + fi + gradle1-restore: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + needs: gradle1-save + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: Run setup-java with the cache for gradle + uses: ./ + id: setup-java + with: + distribution: 'adopt' + java-version: '11' + cache: gradle + cache-dependency-path: __tests__/cache/gradle1/*.gradle* + - name: Confirm that ~/.gradle/caches directory has been made + run: | + if [ ! -d ~/.gradle/caches ]; then + echo "::error::The ~/.gradle/caches directory does not exist unexpectedly" + exit 1 + fi + ls ~/.gradle/caches/ + gradle2-restore: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, windows-latest, ubuntu-latest] + needs: gradle1-save + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + persist-credentials: false + - name: Run setup-java with the cache for gradle + uses: ./ + id: setup-java + with: + distribution: 'adopt' + java-version: '11' + cache: gradle + cache-dependency-path: __tests__/cache/gradle2/*.gradle* + - name: Confirm that ~/.gradle/caches directory has not been made + run: | + if [ -d ~/.gradle/caches ]; then + echo "::error::The ~/.gradle/caches directory exists unexpectedly" + exit 1 + fi