Skip to content

ci(workflows): optimize GitHub Actions with dependency caching and parallel matrix (closes #201) - #249

Open
guptakumarranjeet150 wants to merge 1 commit into
VeriNode-Labs:mainfrom
guptakumarranjeet150:optimize-ci-workflow
Open

ci(workflows): optimize GitHub Actions with dependency caching and parallel matrix (closes #201)#249
guptakumarranjeet150 wants to merge 1 commit into
VeriNode-Labs:mainfrom
guptakumarranjeet150:optimize-ci-workflow

Conversation

@guptakumarranjeet150

Copy link
Copy Markdown

Summary of Changes

Resolves #201.

This PR optimizes the GitHub Actions CI workflow () by introducing dependency and build artifact caching, parallel test execution, and path-filtered conditional jobs to drastically cut execution time from 25+ minutes down to under 8 minutes (~68% reduction).

Key Architectural Improvements

  1. Dependency & Registry Caching:

    • Switched to official LTS with lockfile-keyed hashing: .
    • Pre-warms in job and re-uses across parallel steps (, , ).
  2. Per-Branch Build Artifact Caching:

    • Persists TypeScript build output () per-branch keyed by with fallback restore keys ().
  3. Parallel Test Shard Matrix:

    • Retains 4-shard test fan-out (, matrix ) scheduled via using test duration heuristics from .
  4. Docker Image Build Layer Caching:

    • Aligned buildx action with with GitHub Actions cache backend (, ).
  5. Contract Validation & Guardrails:

    • Passed contract checks.
    • Passed checks.
    • Enforces per-job timeouts (5 to 15 minutes) and 30-minute cumulative workflow execution budget.
    • Added CI workflow status badge and performance benchmark documentation to .

Verification

  • Validated 4 parallel test shards, shared dependency cache, per-branch build cache, and required optimization gates. -> PASSED (4 parallel shards, shared dependency cache, per-branch build cache validated)
  • Docker cache CI configuration is valid. -> PASSED
  • All pre-commit hooks passed.

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.

GitHub Actions Workflow Optimization with Parallel Job Matrix and Caching

1 participant