Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Guardian — All-in-One Python Quality Gate

A single GitHub Action that runs ruff, black, mypy, bandit, and pytest — replacing 5+ separate actions. Beautiful output, PR annotations, and configurable severity thresholds.

Quick Start

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.

Features

  • 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

Inputs

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

Upgrading to Premium

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

License

MIT — free for personal and commercial use.


Built by Kryptorious Quantum Biosciences

About

All-in-one Python quality gate for GitHub Actions — ruff, black, mypy, bandit, and pytest in one step

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors