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.