Skip to content

Add Gradle cache to setup-java steps in CI workflows#1372

Merged
dbwiddis merged 2 commits intoopensearch-project:mainfrom
dbwiddis:add-gradle-cache-to-setup-java
May 6, 2026
Merged

Add Gradle cache to setup-java steps in CI workflows#1372
dbwiddis merged 2 commits intoopensearch-project:mainfrom
dbwiddis:add-gradle-cache-to-setup-java

Conversation

@dbwiddis
Copy link
Copy Markdown
Member

Description

Adds cache: gradle to all actions/setup-java steps across GitHub Actions workflow files. This enables the built-in dependency caching provided by the setup-java action, which caches Gradle dependencies between workflow runs to reduce build times.

Changes

  • Added cache: gradle to all 9 setup-java steps across 5 workflow files:
    • CI.yml (6 steps: spotless, javadoc, build, integTest, integMultiNodeTest, integTenantAwareTest)
    • publish-snapshots.yml (1 step)
    • test-api-consistency.yml (1 step)
    • test_bwc.yml (1 step)
    • test_security.yml (1 step)
  • Bumped setup-java from v3 to v4 in test-api-consistency.yml for consistency with other workflows

Reference

Issues Resolved

N/A

Check List

  • New functionality includes testing
    • N/A (infrastructure-only change, CI runs will validate)
  • New functionality has been documented
    • N/A
  • Commits are signed per the DCO using --signoff

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.38%. Comparing base (f235210) to head (95b2109).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1372      +/-   ##
============================================
- Coverage     78.38%   78.38%   -0.01%     
- Complexity     1306     1308       +2     
============================================
  Files           106      106              
  Lines          6015     6019       +4     
  Branches        640      641       +1     
============================================
+ Hits           4715     4718       +3     
+ Misses         1013     1012       -1     
- Partials        287      289       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbwiddis dbwiddis force-pushed the add-gradle-cache-to-setup-java branch 2 times, most recently from b307bb9 to 5e3d01e Compare May 1, 2026 18:31
Adds cache: gradle to all actions/setup-java steps across workflow files
to cache Gradle dependencies between runs, reducing build times.

Also bumps setup-java from v3 to v4 in test-api-consistency.yml for
consistency with other workflows.

Signed-off-by: Daniel Widdis <widdis@gmail.com>
Signed-off-by: Dan Widdis <widdisd@amazon.com>
@dbwiddis dbwiddis force-pushed the add-gradle-cache-to-setup-java branch from 5e3d01e to 2233dc5 Compare May 2, 2026 02:25
@dbwiddis dbwiddis merged commit a60f057 into opensearch-project:main May 6, 2026
39 checks passed
@dbwiddis dbwiddis deleted the add-gradle-cache-to-setup-java branch May 6, 2026 02:38
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.

2 participants