Use artifacts to share Maven dependencies between workflow jobs#1794
Merged
yingbull merged 5 commits intoJan 18, 2026
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Co-authored-by: yingbull <8680161+yingbull@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Apply changes based on feedback for workflow and devcontainer fixes
Use artifacts to share Maven dependencies between workflow jobs
Jan 18, 2026
There was a problem hiding this comment.
Pull request overview
This PR optimizes the GitHub Actions workflow by eliminating redundant Maven dependency downloads across parallel test jobs. GitHub Actions cache is only available at job boundaries, not shared between jobs in the same workflow run, causing the build, modern-tests, and legacy-tests jobs to each download dependencies independently.
Changes:
- Build job uploads Maven dependencies as an artifact after compilation
- Modern-tests and legacy-tests jobs download the shared artifact instead of re-fetching dependencies
- Cache action retained in build job for cross-run optimization only
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Actions cache is only restored at job start and saved at job end—not shared between jobs in the same workflow run. The parallel test jobs were redundantly downloading Maven dependencies already fetched by the build job.
Changes
Build job:
.m2-cacheas artifact aftermake installTest jobs (modern-tests, legacy-tests):
maven-dependencies-cacheartifact from build jobConfiguration:
maven-dependencies-cache(specific to avoid conflicts)Result
Dependencies downloaded once per workflow run instead of three times. Cache provides cross-run optimization, artifacts provide within-run sharing.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Summary by cubic
Applied feedback from #1792 to share Maven dependencies via artifacts and stabilize modern and legacy test jobs, improving reliability in CI and local development.
Written for commit cd8fc42. Summary will update on new commits.