From 242e0651015f7f94e1cd59a29d975ed80e6a86bd Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 6 Feb 2026 09:50:32 -0500 Subject: [PATCH] ci: add individual badges for each Python version (3.9-3.14) - Create separate workflow files for Python 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 - Each Python version gets its own status badge - Easily track which version(s) are failing tests - Update README to display all 6 Python version badges - Badges are clickable and link to individual workflow results - Maintain pytest.yml as combined multi-version workflow --- .github/workflows/pytest-py310.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/pytest-py311.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/pytest-py312.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/pytest-py313.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/pytest-py314.yml | 36 ++++++++++++++++++++++++++++++ .github/workflows/pytest-py39.yml | 36 ++++++++++++++++++++++++++++++ README.md | 14 +++++++++++- 7 files changed, 229 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pytest-py310.yml create mode 100644 .github/workflows/pytest-py311.yml create mode 100644 .github/workflows/pytest-py312.yml create mode 100644 .github/workflows/pytest-py313.yml create mode 100644 .github/workflows/pytest-py314.yml create mode 100644 .github/workflows/pytest-py39.yml diff --git a/.github/workflows/pytest-py310.yml b/.github/workflows/pytest-py310.yml new file mode 100644 index 0000000..7a98ea2 --- /dev/null +++ b/.github/workflows/pytest-py310.yml @@ -0,0 +1,36 @@ +name: pytest-py310 + +on: + push: + pull_request: + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y p7zip-full transmission-cli + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install project dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run tests + env: + HATE_CRACK_RUN_E2E: "0" + HATE_CRACK_RUN_DOCKER_TESTS: "0" + HATE_CRACK_RUN_LIVE_TESTS: "0" + HATE_CRACK_SKIP_INIT: "1" + run: .venv/bin/python -m pytest diff --git a/.github/workflows/pytest-py311.yml b/.github/workflows/pytest-py311.yml new file mode 100644 index 0000000..0ae8bce --- /dev/null +++ b/.github/workflows/pytest-py311.yml @@ -0,0 +1,36 @@ +name: pytest-py311 + +on: + push: + pull_request: + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y p7zip-full transmission-cli + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install project dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run tests + env: + HATE_CRACK_RUN_E2E: "0" + HATE_CRACK_RUN_DOCKER_TESTS: "0" + HATE_CRACK_RUN_LIVE_TESTS: "0" + HATE_CRACK_SKIP_INIT: "1" + run: .venv/bin/python -m pytest diff --git a/.github/workflows/pytest-py312.yml b/.github/workflows/pytest-py312.yml new file mode 100644 index 0000000..1549a6b --- /dev/null +++ b/.github/workflows/pytest-py312.yml @@ -0,0 +1,36 @@ +name: pytest-py312 + +on: + push: + pull_request: + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y p7zip-full transmission-cli + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install project dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run tests + env: + HATE_CRACK_RUN_E2E: "0" + HATE_CRACK_RUN_DOCKER_TESTS: "0" + HATE_CRACK_RUN_LIVE_TESTS: "0" + HATE_CRACK_SKIP_INIT: "1" + run: .venv/bin/python -m pytest diff --git a/.github/workflows/pytest-py313.yml b/.github/workflows/pytest-py313.yml new file mode 100644 index 0000000..629864a --- /dev/null +++ b/.github/workflows/pytest-py313.yml @@ -0,0 +1,36 @@ +name: pytest-py313 + +on: + push: + pull_request: + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y p7zip-full transmission-cli + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install project dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run tests + env: + HATE_CRACK_RUN_E2E: "0" + HATE_CRACK_RUN_DOCKER_TESTS: "0" + HATE_CRACK_RUN_LIVE_TESTS: "0" + HATE_CRACK_SKIP_INIT: "1" + run: .venv/bin/python -m pytest diff --git a/.github/workflows/pytest-py314.yml b/.github/workflows/pytest-py314.yml new file mode 100644 index 0000000..57a64c8 --- /dev/null +++ b/.github/workflows/pytest-py314.yml @@ -0,0 +1,36 @@ +name: pytest-py314 + +on: + push: + pull_request: + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-python@v5 + with: + python-version: "3.14" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y p7zip-full transmission-cli + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install project dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run tests + env: + HATE_CRACK_RUN_E2E: "0" + HATE_CRACK_RUN_DOCKER_TESTS: "0" + HATE_CRACK_RUN_LIVE_TESTS: "0" + HATE_CRACK_SKIP_INIT: "1" + run: .venv/bin/python -m pytest diff --git a/.github/workflows/pytest-py39.yml b/.github/workflows/pytest-py39.yml new file mode 100644 index 0000000..4c14805 --- /dev/null +++ b/.github/workflows/pytest-py39.yml @@ -0,0 +1,36 @@ +name: pytest-py39 + +on: + push: + pull_request: + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - uses: actions/setup-python@v5 + with: + python-version: "3.9" + + - name: Install system dependencies + run: sudo apt-get update && sudo apt-get install -y p7zip-full transmission-cli + + - name: Install uv + run: python -m pip install --upgrade pip uv==0.9.28 + + - name: Install project dependencies + run: | + uv venv .venv + uv pip install --python .venv/bin/python ".[dev]" + + - name: Run tests + env: + HATE_CRACK_RUN_E2E: "0" + HATE_CRACK_RUN_DOCKER_TESTS: "0" + HATE_CRACK_RUN_LIVE_TESTS: "0" + HATE_CRACK_SKIP_INIT: "1" + run: .venv/bin/python -m pytest diff --git a/README.md b/README.md index b0d746c..d175e73 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,15 @@ [![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) +**Python Version Testing:** + +[![py39](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py39.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py39.yml) +[![py310](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py310.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py310.yml) +[![py311](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py311.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py311.yml) +[![py312](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py312.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py312.yml) +[![py313](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py313.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py313.yml) +[![py314](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py314.yml/badge.svg)](https://github.com/trustedsec/hate_crack/actions/workflows/pytest-py314.yml) + **What Each Badge Represents:** - **Ruff** - 🔍 Code quality and style validation @@ -27,9 +36,12 @@ - **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 +- **Python Version Badges** - 🐍 Individual Python version test results + - ✅ **PASS**: Tests pass on that specific Python version + - ❌ **FAIL**: Tests fail on that specific Python version + ## Installation ### 1. Install hashcat