Skip to content

Consolidate cache-dependency-path e2e workflow and add maven/sbt coverage#1124

Merged
brunoborges merged 2 commits into
mainfrom
brunoborges-merge-cache-dependency-path-e2e
Jul 15, 2026
Merged

Consolidate cache-dependency-path e2e workflow and add maven/sbt coverage#1124
brunoborges merged 2 commits into
mainfrom
brunoborges-merge-cache-dependency-path-e2e

Conversation

@brunoborges

@brunoborges brunoborges commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidates the e2e cache workflows and extends cache-dependency-path coverage.

1. Merge the standalone dependency-path workflow

The standalone e2e-cache-dependency-path.yml ("Validate cache with cache-dependency-path option") overlapped heavily with e2e-cache.yml ("Validate cache"). Its three gradle jobs (gradle1-save, gradle1-restore, gradle2-restore) were copied verbatim into e2e-cache.yml — same matrix (macos-latest, windows-latest, ubuntu-latest), cache-dependency-path inputs, and needs: relationships (both restores depend on gradle1-save) — and the standalone file was deleted. No coverage change from this step.

2. Close the gap: cache-dependency-path for maven and sbt

Previously cache-dependency-path was only exercised for gradle. This PR adds the same three-job pattern for maven and sbt:

  • maven: maven1-savemaven1-restore (cache hit) / maven2-restore (cache miss)
  • sbt: sbt1-savesbt1-restore (cache hit) / sbt2-restore (cache miss)

Each save + restore pair uses the same cache-dependency-path, so the restore is a hit. The second restore points at a new __tests__/cache/maven2 / __tests__/cache/sbt2 fixture whose different dependencies hash to a different cache key, so the cache is a miss and the tool's cache directory is not created — mirroring gradle2-restore exactly.

New fixtures:

  • __tests__/cache/maven2/pom.xml (+ .gitignore) — commons-lang3 instead of junit-jupiter-api
  • __tests__/cache/sbt2/build.sbt (+ .gitignore) — different scala-parser-combinators version

The maven/sbt dependency-path jobs reuse each tool's existing matrix and setup (maven on macos-15-intel; sbt on macos-15-intel/ubuntu-22.04 with brew install sbt on macOS and OS-specific Coursier cache checks), so they are not affected by gradle's macos-latest.

Validation

  • YAML parses via python3 + yaml.safe_load; all 15 job names are unique.
  • needs: verified for every restore job.
  • Confirmed the maven/sbt vs maven2/sbt2 fixtures hash differently, so the "miss" jobs genuinely miss the 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
@brunoborges
brunoborges requested a review from a team as a code owner July 15, 2026 02:20
Copilot AI review requested due to automatic review settings July 15, 2026 02:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates the cache cache-dependency-path end-to-end validation into the existing e2e-cache.yml workflow by moving the three Gradle dependency-path jobs into it and deleting the now-redundant standalone workflow file.

Changes:

  • Added the gradle1-save, gradle1-restore, and gradle2-restore jobs (including their matrix and needs: relationships) to .github/workflows/e2e-cache.yml.
  • Removed .github/workflows/e2e-cache-dependency-path.yml entirely to avoid duplicate workflow definitions.
Show a summary per file
File Description
.github/workflows/e2e-cache.yml Appends the three cache-dependency-path Gradle jobs to the existing cache E2E workflow.
.github/workflows/e2e-cache-dependency-path.yml Deletes the redundant standalone workflow after consolidating its jobs into e2e-cache.yml.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Low

Previously only gradle exercised the cache-dependency-path input. Mirror
the gradle save/restore(hit)/restore(miss) pattern for maven and sbt:

- maven1-save/maven1-restore/maven2-restore
- sbt1-save/sbt1-restore/sbt2-restore

Each save+restore pair uses the same cache-dependency-path so the restore
is a hit, while the second restore points at a new maven2/sbt2 fixture
whose different dependencies produce a different hash, so the cache is a
miss (directory not created). New fixtures added under __tests__/cache.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 635b89fa-5c35-49e1-a257-dc9001ebb8db
@brunoborges brunoborges changed the title Merge cache-dependency-path e2e workflow into e2e-cache Consolidate cache-dependency-path e2e workflow and add maven/sbt coverage Jul 15, 2026
@brunoborges
brunoborges merged commit c3568cc into main Jul 15, 2026
439 of 440 checks passed
@brunoborges
brunoborges deleted the brunoborges-merge-cache-dependency-path-e2e branch July 15, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants