Continuous Integration
Relevant source files
The following files were used as context for generating this wiki page:
The guiltty project utilizes a robust Continuous Integration (CI) pipeline centered around GitHub Actions to maintain code quality, security, and reproducibility. The CI infrastructure enforces strict quality gates involving formatting, linting, and code coverage, ensuring that all contributions meet the project's pre-alpha standards.
Sources: README.md:40-45, tasks/issue-8-chore-ci-hardening-follow-ups-caching-sha-pinned.md:7-7
Quality Gates and Verification
The CI pipeline is defined by a "quality" job that executes a specific set of commands to validate the workspace. These commands serve as the project's primary quality gate.
| Tool | Command | Purpose |
|---|---|---|
| rustfmt | cargo fmt --all -- --check | Enforces project-wide formatting standards. |
| Clippy | cargo clippy --workspace --all-targets -- -D warnings | Catches common mistakes and enforces linting rules as errors. |
| LLVM Cov | cargo llvm-cov --workspace --summary-only --fail-under-lines 90 | Ensures test coverage remains at or above 90%. |
Sources: tasks/issue-8-chore-ci-hardening-follow-ups-caching-sha-pinned.md:7-7, tasks/issue-16-consumability-assessment-from-iklo-guiltty-s.md:7-7
Static Analysis Configuration
Static analysis behavior is further refined through workspace-level configuration files:
- clippy.toml: Defines complexity and nesting thresholds, specifically setting
too-many-lines-threshold = 100andexcessive-nesting-threshold = 6. - rustfmt.toml: Pins the project to stable
rustfmtdefaults to prevent divergence between local environments and CI.
Sources: clippy.toml:1-5, rustfmt.toml:1-5, Cargo.toml:15-22
Infrastructure and Hardening
The CI environment is pinned to specific versions of tools and actions to ensure reproducibility and security.
Toolchain Management
The project uses mise to manage the development toolchain. The pinned version for the Rust compiler is 1.96.0, which is also declared as the Minimum Supported Rust Version (MSRV) in the workspace Cargo.toml.
Sources: mise.toml:1-4, Cargo.toml:11-11, tasks/issue-16-consumability-assessment-from-iklo-guiltty-s.md:38-42
Workflow Hardening
The project implements "hardened" GitHub Actions by pinning them to specific commit SHAs rather than mutable version tags.
The diagram illustrates the hardened execution flow of the CI quality job, including SHA-pinned actions and the strategic placement of the caching layer.
Sources: tasks/issue-8-chore-ci-hardening-follow-ups-caching-sha-pinned.md:14-23, tasks/issue-8-chore-ci-hardening-follow-ups-caching-sha-pinned.md:35-41
Caching Strategy
To optimize job duration, the project utilizes Swatinem/rust-cache. The cache is strategically placed after the fmt check because formatting is computationally inexpensive and should fail fast without waiting for cache restoration.
Sources: tasks/issue-8-chore-ci-hardening-follow-ups-caching-sha-pinned.md:35-41
Automation and Dependency Tracking
The project employs automated tools to keep the CI environment and dependencies secure and up-to-date.
- Dependabot: Configured to monitor the
github-actionsecosystem on a weekly schedule to manage updates for the SHA-pinned actions. - Workspace Metadata: The project ensures all workspace crates (
guiltty-core,guiltty-kitty,guiltty,examples) inherit the workspace-levelrust-version.
Sources: tasks/issue-8-chore-ci-hardening-follow-ups-caching-sha-pinned.md:55-62, tasks/issue-16-consumability-assessment-from-iklo-guiltty-s.md:38-42, Cargo.toml:4-9
Summary
Continuous Integration in guiltty is designed to be a "reproducible quality engine." By pinning toolchains in mise.toml, actions in ci.yml, and linting rules in clippy.toml, the project ensures that the 90% coverage floor and strict linting standards are consistently applied across all development stages.