Skip to content

ci(pipeline): speed up lint and test CI pipeline#87

Open
demo10-labworksdev wants to merge 2 commits intomainfrom
ci/speed-up-lint-test-pipeline
Open

ci(pipeline): speed up lint and test CI pipeline#87
demo10-labworksdev wants to merge 2 commits intomainfrom
ci/speed-up-lint-test-pipeline

Conversation

@demo10-labworksdev
Copy link
Copy Markdown

Summary

Closes #83

  • Skip Docker-based pre-commit hooks in CI (lychee-docker, actionlint-docker) and run each via a dedicated native GitHub Action (lycheeverse/lychee-action, raven-actions/actionlint), which cache binaries and avoid Docker image pulls inside pre-commit — the primary source of the ~3m34s lint time
  • Split heavyweight test job into minimal unit-test job: uses only setup-uv (no full bootstrap, no Docker, no QEMU, no grant) — unit tests get ~8-10s lighter startup and run independently of Docker
  • Fix trufflehog hook for Windows: switched from language: golang to language: docker_image — the golang hook fails on Windows due to deeply nested Go module paths (WinError 145)
  • Upgrade docker/setup-qemu-action v3 → v4: eliminates the Node.js 20 deprecation warning on every run
  • Add time timing output on lint and build steps to track improvements over time
  • Apply same lint optimizations to commit.yml

Why not docker save/docker load caching?

Research confirmed this is slower than re-pulling on GitHub-hosted runners — CPU-bound tar serialization loses to the runners' fast registry network. Switching to native non-Docker tools is the right approach.

Expected speedup

Job Before After (est.)
Lint ~3m54s ~1m (no Docker image pulls in pre-commit)
Test → Unit-test ~3m9s ~40s (unit tests only, minimal setup)
Wall-clock total ~4m10s ~1m30s

Test plan

  • CI passes on this PR
  • Lint job completes faster than the ~3m54s baseline
  • Unit-test job completes faster than the ~3m9s baseline
  • lychee link checking still runs (via lycheeverse/lychee-action)
  • actionlint still runs (via raven-actions/actionlint)
  • trufflehog still runs (via Docker image, now works on Windows too)

🤖 Generated with Claude Code

demo10-labworksdev and others added 2 commits April 7, 2026 11:31
- Skip Docker-based pre-commit hooks (lychee-docker, actionlint-docker)
  in CI and run each via its own native GitHub Action instead, which
  caches binaries and avoids Docker image pulls in pre-commit
- Split heavyweight 'test' job into minimal 'unit-test' job: uses only
  setup-uv (no full bootstrap) so unit tests run without Docker, QEMU,
  grant, or pre-commit setup - faster feedback on every PR
- Add timing output (time prefix) on lint and build steps
- Upgrade docker/setup-qemu-action v3 -> v4 (fixes Node.js 20 deprecation)
- Apply same lint optimizations to commit.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The trufflehog golang hook fails on Windows due to deeply nested Go
module paths that Windows cannot clean up (WinError 145). Switch to
the trufflesecurity/trufflehog:3.94.2 Docker image via a local hook
so it works on both Windows (Docker already running) and Linux CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@ai-coding-guardrails ai-coding-guardrails bot left a comment

Choose a reason for hiding this comment

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

Nice work! 😎

I didn't find anything of concern

Reviewed with 🤟 by Zenable

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.

Speed up lint and test CI pipeline

1 participant