A single GitHub Action that runs ruff, black, mypy, bandit, and pytest — replacing 5+ separate actions. Beautiful output, PR annotations, and configurable severity thresholds.
name: Quality Gate
on: [push, pull_request]
jobs:
guardian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: kryptorious/python-guardian@v1
with:
path: src/That's it. One step replaces 30+ lines of workflow YAML.
- ruff — Lightning-fast linting with GitHub annotations
- black — Code formatting check with inline diff
- mypy — Static type checking
- bandit — Security vulnerability scanning
- pytest — Test suite execution
- Configurable — Enable/disable each tool, set severity thresholds
- PR-friendly — Annotations appear inline on pull requests
- Beautiful output — Clear pass/fail summary in workflow logs
| Input | Default | Description |
|---|---|---|
path |
. |
Path to Python source directory |
python-version |
3.12 |
Python version |
ruff |
true |
Run ruff linting |
black |
true |
Check formatting |
mypy |
true |
Type checking |
bandit |
true |
Security scan |
pytest |
true |
Run tests |
fail-on-error |
true |
Fail workflow on errors |
fail-on-warning |
false |
Fail on warnings (strict mode) |
max-line-length |
100 |
Line length for formatting |
pytest-args |
"" |
Extra pytest arguments |
The free version covers basic quality gates. Upgrade to Premium for:
- Custom rule packs (Django, FastAPI, ML, Security)
- Historical trend dashboard
- Slack/Discord notifications
- Team configuration sharing
- Priority support
MIT — free for personal and commercial use.
Built by Kryptorious Quantum Biosciences