mirror of
https://github.com/allaunthefox/Research-Stack.git
synced 2026-07-31 03:05:21 +00:00
| .. | ||
| ci-cd.yml | ||
| ci-comprehensive.yml | ||
| code-smells.yml | ||
| codeql-analysis.yml | ||
| dead-code.yml | ||
| deployment.yml | ||
| megalinter.yml | ||
| pr-validation.yml | ||
| README.md | ||
| sbom.yml | ||
| scorecard.yml | ||
| slsa-attestations.yml | ||
| trufflehog.yml | ||
| wiki-lint.yml | ||
GitHub Actions CI/CD Workflows
This directory contains the GitHub Actions workflows for the NoDupeLabs project.
Available Workflows
1. Python Testing (python-testing.yml)
- Trigger: Push and pull requests to
mainbranch - Purpose: Run comprehensive Python tests across multiple Python versions
- Features:
- Tests on Python 3.8, 3.9, 3.10, 3.11
- Code coverage with pytest-cov
- Codecov integration for coverage reporting
2. Code Quality Checks (code-quality.yml)
- Trigger: Push and pull requests to
mainbranch - Purpose: Enforce code quality standards
- Features:
- Pylint with custom configuration
- Black code formatting checks
- isort import sorting checks
- mypy type checking
- Markdown linting
- 100% docstring coverage requirement (strict enforcement)
- Detailed docstring coverage reporting
3. Deployment (deployment.yml)
- Trigger: Tag pushes (v*..) and manual workflow dispatch
- Purpose: Automated deployment to PyPI and GitHub Pages
- Features:
- PyPI package deployment
- Documentation deployment to GitHub Pages
- Sequential deployment (docs after PyPI)
4. Comprehensive CI (ci-comprehensive.yml)
- Trigger: Push and pull requests to
mainbranch - Purpose: All-in-one CI pipeline
- Features:
- Parallel execution of testing and quality checks
- Security scanning with bandit and safety
- Integration tests
- End-to-end validation
Secrets Required
For full functionality, the following GitHub SECRET_REMOVEDs should be configured:
CODECOV_TOKEN: Codecov upload TOKEN_REMOVEDPYPI_API_TOKEN: PyPI API TOKEN_REMOVED for package deployment
Workflow Triggers
- Push to main: Runs all CI checks
- Pull Request to main: Runs all CI checks
- Tag push (v..)*: Triggers deployment workflow
- Manual dispatch: Can trigger deployment workflow
Strict Requirements Enforcement
🔒 Pull Request Requirements (Before Merging to Main)
All of the following must pass for PR approval:
- Python Testing: All tests must pass across Python 3.8-3.11
- Code Quality Checks:
- Pylint: Minimum score of 10/10, all checks enabled (except fixme/line-too-long)
- Black: Code formatting must be perfect
- isort: Import sorting must be perfect
- mypy: Strict type checking with no untyped definitions
- Docstrings: 100% coverage required for all public classes and functions
- Comprehensive CI: All parallel checks must pass
- Branch Protection: Requires admin approval and code owner reviews
📋 Code Quality Standards
- Linting: Zero tolerance for linting violations
- Formatting: Perfect black/isort compliance required
- Type Checking: Strict mypy enforcement with full type coverage
- Documentation: 100% docstring coverage mandatory
- Testing: All tests must pass with good coverage
Best Practices
- Run Locally First:
pylint nodupe/ --fail-under=10.0 --enable=all - Format Before Committing:
black nodupe/ tests/ && isort nodupe/ tests/ - Type Check:
mypy nodupe/ --strict - Document Everything: Ensure 100% docstring coverage
- Test Thoroughly: Run
pytest tests/ --cov=nodupe - Branch Protection: Configure
.github/settings.ymlfor strict PR requirements - Version Tags: Use semantic versioning for releases (v1.0.0, v2.1.0, etc.)