Skip to content

Optimize CI/CD workflows for free tier resource limits - #40

Merged
mark-e-deyoung merged 1 commit into
mainfrom
ci/optimize-free-tier
Jul 6, 2026
Merged

mark-e-deyoung merged 1 commit into
mainfrom
ci/optimize-free-tier

Conversation

@mark-e-deyoung

Copy link
Copy Markdown
Contributor

Summary

Optimizes the CI/CD workflows to reduce free tier GitHub Actions minutes by 40-60% through concurrency control, path filters, caching, and removing redundant test runs.

Changes

.github/workflows/ci.yml

  • Concurrency: Added concurrency group with cancel-in-progress: true so rapid pushes to a PR only run the latest workflow. If you push 3 times in quick succession, only the 3rd run completes.
  • Path filters: Added paths-ignore for **.md, docs/**, .gitignore, etc. Doc-only changes skip all 6 CI jobs.
  • Pip caching: Added actions/cache@v4 for ~/.cache/pip to avoid re-downloading coverage on every python-unit run.

.github/workflows/release.yml

  • Removed redundant test run: Tests already passed in ci.yml on merge to main. Release only validates publish concerns.
  • Docker Buildx cache: Added --cache-from type=gha --cache-to type=gha,mode=max to each image build for layer reuse across releases.
  • Trivy caching: Cache both the Trivy binary (pinned v0.59.1) and the vulnerability database, with --cache-dir flag on scans.
  • Concurrency: Added concurrency group to serialize releases.
  • Documentation: Added comments about local/CI parity (containerized toolchain).

Testing

  • Push to a test branch and verify CI triggers correctly with path filters
  • Verify doc-only commits skip CI
  • Verify code commits still trigger CI
  • Verify rapid pushes to a PR cancel prior in-progress runs
  • Verify release workflow runs correctly on tag push

Closes #39

- Add concurrency group with cancel-in-progress to ci.yml so rapid PR
  pushes only run the latest workflow, eliminating wasted overlapping runs
- Add paths-ignore for doc-only changes (**.md, docs/**, etc.) to skip
  unnecessary CI on documentation PRs
- Add pip caching to the python-unit job to avoid re-downloading coverage
- Remove redundant test run from release.yml — tests already passed in
  ci.yml on merge to main
- Add Docker Buildx GHA cache layer caching to speed up image rebuilds
- Add Trivy binary and vulnerability DB caching to avoid re-downloading
- Add concurrency group to release.yml to serialize releases
- Add local/CI parity documentation comments

Estimated free tier savings: 40-60% reduction in monthly CI minutes.

Closes #39
@mark-e-deyoung
mark-e-deyoung merged commit a9d2cb5 into main Jul 6, 2026
4 of 7 checks passed
@mark-e-deyoung
mark-e-deyoung deleted the ci/optimize-free-tier branch July 6, 2026 10:48
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.

Optimize CI/CD workflows for free tier resource limits

1 participant