Skip to content

ci: add trusted Gradle cache policy - #5137

Open
MohamadJaara wants to merge 4 commits into
developfrom
mo/ci/trusted-gradle-cache
Open

ci: add trusted Gradle cache policy#5137
MohamadJaara wants to merge 4 commits into
developfrom
mo/ci/trusted-gradle-cache

Conversation

@MohamadJaara

Copy link
Copy Markdown
Member

Goal

Reduce CI cache restore time and prevent untrusted or release workflows from reading or writing shared Gradle state.

What changed

  • Replaced the monolithic Warp Gradle cache with gradle/actions/setup-gradle.
  • Added one reusable Java and Gradle setup action for cache policy, wrapper validation, and optional KVM setup.
  • Enabled Gradle task-output caching only for the trusted develop lifecycle.
  • Isolated Gradle homes on long-lived self-hosted release-generation and QA runners.
  • Kept the Android UI-test AVD cache separate.

Cache trust model

Context Restore Write
Push to develop Yes Yes
Same-repository PR targeting develop Yes PR scope only
Merge queue targeting develop Yes No
Fork PR No No
Main/release push or release publication No No
Manual or scheduled generation No No

Impact

Develop and trusted PR builds can reuse smaller, Gradle-aware cache segments without repeatedly restoring the previous 8+ GB archive. Release, generation, fork, and unrelated branch workflows do not consume shared Gradle cache state.

Validation

  • All changed workflow and action YAML parses successfully.
  • The new composite action passes the repository's pedantic Zizmor policy.
  • Remaining cache references were audited; only the intentional AVD cache remains on Warp caching.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Test Results

2 225 tests  ±0   2 225 ✅ ±0   2m 11s ⏱️ +24s
  241 suites ±0       0 💤 ±0 
  241 files   ±0       0 ❌ ±0 

Results for commit de8e616. ± Comparison against base commit 4227a16.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.52%. Comparing base (4227a16) to head (de8e616).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5137   +/-   ##
========================================
  Coverage    50.52%   50.52%           
========================================
  Files          671      671           
  Lines        24604    24604           
  Branches      3832     3832           
========================================
  Hits         12430    12430           
  Misses       11029    11029           
  Partials      1145     1145           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4227a16...de8e616. Read the comment docs.

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

@pull-request-size pull-request-size Bot added size/M and removed size/S labels Aug 5, 2026
@MohamadJaara
MohamadJaara marked this pull request as ready for review August 7, 2026 07:51
@MohamadJaara
MohamadJaara requested a review from a team as a code owner August 7, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant