From 94e13771375711ee90335dd14f1429006fe5b3b4 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 6 Feb 2026 09:49:30 -0500 Subject: [PATCH] ci: split tests workflow into separate ruff, mypy, and pytest workflows - Create individual workflow files for ruff, mypy, and pytest - Each workflow has its own status badge for independent monitoring - Ruff badge shows code quality status - Mypy badge shows type checking status - Pytest badge shows multi-version testing status - Update README with all three badges and clear status documentation - Remove combined tests.yml in favor of granular workflows --- .github/workflows/mypy.yml | 26 +++++++++++++++++++++ .github/workflows/{tests.yml => pytest.yml} | 25 +------------------- .github/workflows/ruff.yml | 26 +++++++++++++++++++++ README.md | 24 +++++++++++++++---- 4 files changed, 72 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/mypy.yml rename .github/workflows/{tests.yml => pytest.yml} (64%) create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 0000000..502a688 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,26 @@ +name: mypy + +on: + push: + pull_request: + +jobs: + mypy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install dev dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run mypy + run: .venv/bin/mypy hate_crack diff --git a/.github/workflows/tests.yml b/.github/workflows/pytest.yml similarity index 64% rename from .github/workflows/tests.yml rename to .github/workflows/pytest.yml index 9080536..d2b463d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/pytest.yml @@ -1,33 +1,10 @@ -name: tests +name: pytest on: push: pull_request: jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.13" - - - name: Install uv - run: python -m pip install --upgrade pip uv==0.9.28 - - - name: Install dev dependencies - run: | - uv venv .venv - uv pip install --python .venv/bin/python ".[dev]" - - - name: Run ruff - run: .venv/bin/ruff check hate_crack - - - name: Run mypy - run: .venv/bin/mypy hate_crack - pytest: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..6230128 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,26 @@ +name: ruff + +on: + push: + pull_request: + +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install dev dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run ruff + run: .venv/bin/ruff check hate_crack diff --git a/README.md b/README.md index 03eb368..b0d746c 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,26 @@ ## Status -[![tests](https://github.com/trustedsec/hate_crack/actions/workflows/tests.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/tests.yml) +**Code Quality & Testing:** -**CI/CD Checks:** -- **Linting (Ruff)** - Code quality and formatting validation -- **Type Checking (Mypy)** - Static type analysis -- **Testing** - Python 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 +[![ruff](https://github.com/trustedsec/hate_crack/actions/workflows/ruff.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/ruff.yml) +[![mypy](https://github.com/trustedsec/hate_crack/actions/workflows/mypy.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/mypy.yml) +[![pytest](https://github.com/trustedsec/hate_crack/actions/workflows/pytest.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest.yml) + +**What Each Badge Represents:** + +- **Ruff** - 🔍 Code quality and style validation + - ✅ **PASS**: Code follows linting rules and best practices + - ❌ **FAIL**: Code has style violations or quality issues + +- **Mypy** - 🔬 Static type checking + - ✅ **PASS**: No type errors detected + - ❌ **FAIL**: Type mismatches or missing annotations found + +- **Pytest** - ✔️ Testing across Python 3.9-3.14 + - ✅ **PASS**: All tests pass on all supported Python versions + - ⚠️ **PARTIAL**: Tests pass on some versions but fail on others + - ❌ **FAIL**: Tests fail on one or more Python versions ## Installation