This directory contains the GitHub Actions workflows and configurations for the GitHound project. These workflows provide comprehensive CI/CD automation, code quality checks, security scanning, and deployment capabilities.
The main CI/CD pipeline that runs on every push and pull request.
Features:
- π― Smart execution: Path-based filtering to skip unnecessary jobs
- ποΈ Multi-platform testing: Ubuntu, Windows, macOS with Python 3.11 & 3.12
- π Code quality: Black, isort, ruff, mypy with caching
- π§ͺ Comprehensive testing: Unit, integration, and performance tests
- π Coverage reporting: Codecov integration with PR comments
- π Security scanning: Safety, bandit with SARIF reporting
- π¦ Package building: Automated builds with integrity checks
- π Documentation: Auto-build and deploy to GitHub Pages
- π PyPI deployment: Secure publishing on releases
Optimizations:
- Advanced caching for pip, mypy, ruff, and other tools
- Conditional job execution based on file changes
- Performance regression detection
- Artifact retention policies
- Failure notifications and auto-issue creation
Advanced security scanning with multiple tools.
Features:
- π CodeQL analysis: Semantic code analysis for vulnerabilities
- π‘οΈ Semgrep scanning: Additional security rule checks
- π¦ Dependency scanning: Safety and pip-audit for vulnerabilities
- π SARIF reporting: Results integrated into GitHub Security tab
- β° Scheduled scans: Weekly security audits
Intelligent pull request automation and management.
Features:
- π·οΈ Auto-labeling: Based on file changes and content
- π Size detection: Automatic PR size labeling (XS/S/M/L/XL)
- π Breaking change detection: Identifies breaking changes
- π‘οΈ Security change detection: Flags security-related changes
- π First-time contributor welcome: Automated welcome messages
β οΈ Large PR warnings: Special handling for large changes- π Conflict detection: Automatic merge conflict detection
Automated code formatting and linting fixes.
Features:
- π€ Automatic fixes: Black, isort, and ruff auto-fixes
- π¬ PR comments: Notification of applied fixes
- π·οΈ Auto-labeling: Marks PRs with auto-fixes applied
- π§ Manual trigger: Can be triggered via workflow dispatch
- β Status checks: Indicates when auto-fix is needed
Environment-specific deployment automation.
Features:
- π Multi-environment: Staging and preview deployments
- π Conditional deployment: Based on branch and labels
- π§ͺ Pre-deployment checks: Tests before deployment
- π Deployment status: GitHub deployment API integration
- π¬ PR comments: Deployment notifications with URLs
- π§Ή Auto-cleanup: Preview environment cleanup on PR close
Automated dependency management configuration.
Features:
- π¦ Python dependencies: Weekly updates with grouping
- π¬ GitHub Actions: Automated action updates
- π³ Docker support: Ready for container deployments
- π₯ Auto-assignment: Automatic reviewer assignment
- π·οΈ Smart labeling: Categorized dependency updates
- π« Ignore rules: Skip major updates for critical packages
Automatic reviewer assignment based on file changes.
Coverage:
- Core application components
- Critical functionality (search engine, MCP server)
- Configuration and build files
- CI/CD workflows
- Documentation and examples
Comprehensive labeling rules for automatic PR categorization.
Categories:
- Component-based labels (core, search-engine, mcp-server, etc.)
- Type-based labels (tests, documentation, build, etc.)
- Priority levels (high, medium, low)
- Change types (enhancement, bug, refactor, etc.)
Structured templates for bug reports and feature requests.
Templates:
- π Bug Report (
bug_report.yml
): Comprehensive bug reporting - β¨ Feature Request (
feature_request.yml
): Detailed feature proposals
Comprehensive pull request template with checklists and guidelines.
Workflow | Push | PR | Schedule | Manual | Labels |
---|---|---|---|---|---|
CI/CD | β | β | β | β | β |
CodeQL | β | β | β (weekly) | β | β |
PR Automation | β | β | β | β | β |
Auto-fix | β | β | β | β | β |
Staging Deploy | β (develop) | β | β | β | β (deploy-preview) |
- SARIF Integration: Security findings in GitHub Security tab
- Dependency Scanning: Automated vulnerability detection
- Secret Scanning: Built-in GitHub secret detection
- Code Analysis: Multi-tool security analysis
- Trusted Publishing: Secure PyPI deployment without API tokens
- Smart Caching: Multi-level caching for dependencies and tools
- Conditional Execution: Skip unnecessary jobs based on changes
- Parallel Execution: Optimized job dependencies
- Artifact Management: Intelligent retention policies
- Matrix Optimization: Reduced test matrix for faster feedback
-
Required Secrets: Set up the following repository secrets:
PYPI_API_TOKEN
: For PyPI publishingCODECOV_TOKEN
: For coverage reporting (optional)SLACK_WEBHOOK_URL
: For failure notifications (optional)SEMGREP_APP_TOKEN
: For Semgrep scanning (optional)
-
Branch Protection: Configure branch protection rules for
main
anddevelop
-
Environments: Set up GitHub environments for
production
andstaging
-
Labels: The workflows will automatically create labels as needed
- Create workflow file in
.github/workflows/
- Update this documentation
- Add appropriate triggers and permissions
- Test with workflow dispatch first
- Test changes in a feature branch
- Use workflow dispatch for testing
- Monitor workflow runs for issues
- Update documentation as needed
- Modify
staging-deploy.yml
for your deployment targets - Update environment URLs and deployment scripts
- Configure environment-specific secrets
- Workflow Status: Monitor via GitHub Actions tab
- Security Alerts: Check GitHub Security tab regularly
- Dependency Updates: Review Dependabot PRs promptly
- Performance: Monitor workflow execution times
- Costs: Review GitHub Actions usage monthly
Add these badges to your README.md to show workflow status:
[](https://github.com/AstroAir/GitHound/actions/workflows/ci.yml)
[](https://github.com/AstroAir/GitHound/actions/workflows/codeql.yml)
[](https://codecov.io/gh/AstroAir/GitHound)
When contributing to workflows:
- Test changes thoroughly
- Update documentation
- Consider backward compatibility
- Follow security best practices
- Add appropriate error handling
For questions or issues with workflows, please create an issue with the ci-cd
label.