This document provides an overview of the DevOps practices, CI/CD pipelines, and automation configured for CubeSolver.
The main CI pipeline runs on every push and pull request to main and develop branches.
Steps:
- Lint - SwiftLint code quality check
- Build - Swift package build with caching
- Test - Run all unit tests in parallel
- Coverage - Generate and upload code coverage reports
Matrix Strategy:
- Xcode 15.2 (primary)
- Xcode 15.3 (compatibility check)
Optimizations:
- Swift Package Manager caching
- Parallel test execution
- Concurrent build jobs
- Workflow concurrency control
CodeQL Analysis:
- Runs on every push and PR
- Weekly scheduled scans (Monday 2 AM UTC)
- Uses
security-extendedandsecurity-and-qualityquery suites - Automatically creates security advisories for findings
Dependency Review:
- Runs on all PRs
- Fails on high or critical vulnerabilities
- Blocks problematic licenses (LGPL variants)
- Posts summary in PR comments
Dependabot:
- Weekly updates for Swift packages (Monday 9 AM)
- Weekly updates for GitHub Actions (Monday 9 AM)
- Auto-labels with
dependenciestag - Requests review from
@markcoleman
Please see SECURITY.md for our security policy and how to report vulnerabilities.
- β Automated security scanning with CodeQL
- β Dependency vulnerability checking
- β Weekly dependency updates via Dependabot
- β Private security advisory reporting
- β Principle of least privilege in permissions
- β Secret scanning (GitHub native)
Releases are automated through GitHub Actions:
-
Tag Creation: Create a tag following semantic versioning (e.g.,
v1.0.0)git tag -a v1.0.0 -m "Release version 1.0.0" git push origin v1.0.0 -
Validation: The release workflow automatically:
- Builds the project in release mode
- Runs all tests
- Runs SwiftLint
-
Release Creation: If validation passes:
- Creates a GitHub release
- Generates changelog from commit history
- Marks pre-releases (alpha, beta, rc) appropriately
- Adds installation instructions
We follow Semantic Versioning 2.0.0:
- MAJOR (v1.0.0): Breaking changes
- MINOR (v1.1.0): New features, backward compatible
- PATCH (v1.0.1): Bug fixes, backward compatible
- Alpha (v1.0.0-alpha.1): Early testing
- Beta (v1.0.0-beta.1): Feature complete, testing
- RC (v1.0.0-rc.1): Release candidate
PRs are automatically labeled based on:
- Files changed (core, ui, scanner, ar, tests, docs, ci)
- PR size (small, medium, large, extra-large)
- Commit message conventions (feat, fix, docs, etc.)
| Label | Purpose |
|---|---|
bug |
Bug reports |
enhancement / feature |
New features |
documentation |
Documentation changes |
security |
Security-related issues |
performance |
Performance improvements |
dependencies |
Dependency updates |
good first issue |
Good for newcomers |
help wanted |
Community help needed |
We recommend using Conventional Commits for consistency:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changesrefactor: Code refactoringperf: Performance improvementstest: Test changesbuild: Build system changesci: CI/CD changeschore: Other changes
Examples:
feat(core): add enhanced cube solver algorithm
fix(ui): correct glassmorphic button styling
docs(readme): update installation instructions
ci(actions): add code coverage reporting- Overall: 80% minimum
- Core Module: 90% minimum
- UI Module: 70% minimum
- Critical Paths: 100%
# Run all tests
swift test
# Run tests with coverage
swift test --enable-code-coverage
# Run specific test suite
swift test --filter CubeCoreTests- Xcode 15.0+
- Swift 6.2+
- SwiftLint (optional but recommended)
# Clone repository
git clone https://github.com/markcoleman/CubeSolver.git
cd CubeSolver
# Install dependencies
swift package resolve
# Build project
swift build
# Run tests
swift test# Install SwiftLint (if not installed)
brew install swiftlint
# Run linter
swiftlint
# Auto-fix issues
swiftlint --fixCoverage reports are automatically generated and uploaded to Codecov.
- Online: Visit codecov.io/gh/markcoleman/CubeSolver
- PR Comments: Coverage diff posted automatically on PRs
- Local: Generate coverage locally with
swift test --enable-code-coverage
See .codecov.yml for coverage thresholds and settings.
Before submitting a PR:
- Code follows Swift style guidelines
- All tests pass locally
- New code has tests
- SwiftLint passes without errors
- Commit messages follow conventional commits
- PR description is clear and complete
- Documentation updated if needed
- No security vulnerabilities introduced
- Automated Checks: All CI workflows must pass
- Code Owner Review:
@markcolemanreviews all PRs - Security Review: Security-related changes get extra scrutiny
- Merge: Squash and merge to main
- Build Time: ~30-60 seconds (cached)
- Test Time: ~5-10 seconds
- Total CI Time: ~2-3 minutes
- CI Success Rate Target: > 95%
- Test Pass Rate Target: 100%
- Security Scan Target: 0 high/critical vulnerabilities
- Small PRs: Keep PRs focused and under 500 lines
- Write Tests: Add tests for all new features
- Document: Update docs for user-facing changes
- Security: Never commit secrets or sensitive data
- Review: Respond to review comments promptly
- Review Speed: Aim to review PRs within 48 hours
- Release Cadence: Regular releases (at least monthly)
- Dependency Updates: Review and merge Dependabot PRs weekly
- Security: Triage security alerts within 24 hours
- Community: Respond to issues and discussions promptly
- GitHub Actions Documentation
- Swift Package Manager
- SwiftLint
- Conventional Commits
- Semantic Versioning
- CodeQL
For questions about DevOps setup:
- Open a GitHub Discussion
- Review CONTRIBUTING.md
- Contact maintainers via issues
Last Updated: 2025-11-16