Skip to content

ci: cache trusted build layers and npm downloads - #56

Merged
hden merged 3 commits into
mainfrom
ci/dependency-cache
Nov 20, 2026
Merged

hden merged 3 commits into
mainfrom
ci/dependency-cache

Conversation

@hden

@hden hden commented Nov 20, 2026

Copy link
Copy Markdown
Owner

CI rebuilt the development image and downloaded npm packages on every fresh runner, increasing traffic to Maven Central, Docker Hub, and npm. Reuse Docker build layers through the GitHub Actions cache and persist npm's content-addressed download cache while continuing to run npm ci against the lockfile.

Only successful pushes to main publish either cache. PR workflows restore caches without publishing entries. Cache saves run after the complete verification, E2E, coverage, and CRAP checks. Existing required checks and token permissions remain unchanged.

Validation: YAML parsing and git diff --check passed; reviewed Compose image naming and cache restore/save consistency. GitHub CI validates the workflow execution. Docker layers reuse preloaded Maven artifacts when deps.edn is unchanged; dependency changes still rebuild that layer, and standalone PostgreSQL pulls still use Docker Hub.

@hden
hden requested a balanced review from Copilot November 20, 2026 11:46
@hden
hden enabled auto-merge (squash) November 20, 2026 11:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the CI caching changes.

No open issues 🎉

What changed in this PR

This PR reduces repeated CI downloads by reusing Docker build layers and npm’s download cache while retaining lockfile-based dependency installation.

Changes:

  • Build and load the development image with Buildx, restoring layers from the GitHub Actions cache.
  • Restore npm downloads and run npm ci --prefer-offline with a mounted cache directory.
  • Publish caches only on pushes to main after all checks pass; PR workflows only restore caches.
File Description
.github/​workflows/​ci.yml Adds Docker layer and npm download caching with saves restricted to successful main builds.

Review effort: Balanced

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.67%. Comparing base (9dc045c) to head (a0386f4).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #56   +/-   ##
=======================================
  Coverage   93.67%   93.67%           
=======================================
  Files          48       48           
  Lines        3401     3401           
=======================================
  Hits         3186     3186           
  Misses        215      215           

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hden
hden merged commit 79c536c into main Nov 20, 2026
3 checks passed
@hden
hden deleted the ci/dependency-cache branch November 20, 2026 11:54
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