Skip to content

Conversation

@charlieroth
Copy link
Owner

@charlieroth charlieroth commented Aug 22, 2025

Overview

Implements a robust CI pipeline with comprehensive quality gates and guardrails for the Capsule project.

What's Changed

  • CI Workflow: Created .github/workflows/ci.yml with full quality checks
  • Database Testing: Configured PostgreSQL service for tests requiring database access
  • Compiler Matrix: Tests against both stable and beta Rust toolchains
  • Performance: Added caching for Rust dependencies and SQLx binaries
  • Documentation: Added CI status badge to README

CI Pipeline Includes

  • Format Check: cargo fmt --check
  • Linting: cargo clippy with warnings as errors
  • Testing: cargo test with PostgreSQL database
  • SQLx Validation: cargo sqlx prepare --check for compile-time query verification
  • Security Audit: cargo audit for vulnerability scanning
  • License Check: cargo deny check for dependency compliance

Technical Details

  • PostgreSQL 16 service with health checks and automatic migration
  • Rust cache optimization using Swatinem/rust-cache@v2
  • SQLx binary caching to speed up subsequent runs
  • Database connection waits for service health before running migrations

Testing

The workflow mirrors the local make check command and handles the database requirement automatically. All existing tests will run in the CI environment with proper PostgreSQL setup.

charlieroth and others added 2 commits August 22, 2025 19:45
- Add CI workflow with format, lint, test, audit, and deny checks
- Configure PostgreSQL service for database-dependent tests
- Set up Rust and SQLx dependency caching
- Add matrix testing for stable and beta Rust compilers
- Add CI status badge to README

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-b79731c7-828b-4935-897f-696188919afc
@charlieroth charlieroth linked an issue Aug 22, 2025 that may be closed by this pull request
2 tasks
@charlieroth charlieroth self-assigned this Aug 22, 2025
charlieroth and others added 4 commits August 22, 2025 19:59
- Remove .sqlx from .gitignore to commit offline metadata
- Generate SQLx prepare files for compile-time query verification
- Fixes CI SQLx prepare check step

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-b79731c7-828b-4935-897f-696188919afc
@charlieroth charlieroth merged commit 1aef2a3 into main Aug 23, 2025
1 check 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.

CI Workflow

2 participants