This guide will help you set up the development environment for Initium and understand the CI/CD pipeline.
- Rust 1.70+ (install from rustup.rs)
- Git
- GitHub account (for CI/CD)
-
Clone the repository
git clone https://github.com/zackkitzmiller/initium.git cd initium -
Install development tools
# Install cargo-tarpaulin for coverage cargo install cargo-tarpaulin --version 0.32.8 # Install cargo-edit for version management cargo install cargo-edit
-
Run tests and coverage
# Run all tests just test # Generate coverage report just test-coverage
- Unit Tests:
tests/unit_tests.rs- Test individual functions and methods - Integration Tests:
tests/integration_tests.rs- Test CLI functionality and file generation - Coverage: Uses
cargo-tarpaulinfor comprehensive coverage reporting
# All tests
just test
# Specific test file
cargo test --test integration_tests
# With coverage
just test-coverage
# Using justfile (preferred)
just test
just test-coverage- Triggers: Push to main/develop, PRs, releases
- Jobs:
- Test: Multi-platform testing (Ubuntu, macOS, Windows)
- Coverage: Coverage reporting and Codecov integration
- Release: Automated release asset creation
- Publish: Automated crates.io publishing
- Manual trigger with version input
- Automated:
- Version bumping
- Changelog generation
- Git tagging
- GitHub release creation
- Sign up at codecov.io
- Connect your GitHub repository
- Add badge to README (already done)
- Configure coverage thresholds in
.codecov.yml
- Project: 80% minimum
- Patch: 80% minimum
- Threshold: 5% decrease allowed
- Go to GitHub Actions → Release workflow
- Click "Run workflow"
- Choose release type (patch/minor/major)
- Enter specific version (optional)
- Click "Run workflow"
# Using justfile
just release-patch # 0.1.0 → 0.1.1
just release-minor # 0.1.0 → 0.2.0
just release-major # 0.1.0 → 1.0.0
# Or manually
cargo set-version --bump patch
git add Cargo.toml Cargo.lock
git commit -m "Bump version for patch release"
git tag -a "v$(cargo get version)" -m "Release v$(cargo get version)"
git push origin main
git push origin "v$(cargo get version)"# Development
just cargo-build # Build debug
just cargo-build-release # Build release
just test # Run tests
just check # Check compilation
just fmt # Format code
just fmt-check # Check formatting
just clippy # Run linter
just clean # Clean build artifacts
# CI/CD
just ci-local # Run local CI checks
# Release
just release-patch # Patch release
just release-minor # Minor release
just release-major # Major release
# Info
just info # Project information# Run all CI checks locally
just ci-local
# This runs:
# - cargo fmt --all -- --check
# - cargo clippy --all-targets --all-features -- -D warnings
# - cargo test --all-features
# - cargo tarpaulin --out Xml --output-dir coverage# Generate HTML report
cargo tarpaulin --out Html
# Generate XML for CI
cargo tarpaulin --out Xml --output-dir coverage
# View coverage
open target/tarpaulin/index.html- Current: 61.41%
- Target: 80%
- Goal: 90%+
- Add tests for untested code paths
- Test error conditions and edge cases
- Mock external dependencies where appropriate
- Test CLI interactions and user flows
- Formatting: Run
just fmtlocally - Clippy: Fix warnings with
just clippy - Tests: Run
just testlocally - Coverage: Ensure
cargo-tarpaulinis installed (just install-tools)
- Version conflicts: Check
Cargo.tomlandCargo.lock - Git issues: Ensure proper authentication and permissions
- Tag conflicts: Delete conflicting tags locally and remotely
- Low coverage: Add tests for untested functions
- Build failures: Check Rust toolchain version
- Report generation: Run
just install-toolsfor cargo-tarpaulin
- Check GitHub Actions logs
- Review this setup guide
- Search existing issues
- Create new issue with detailed information