Files
CI-templates/.gitea/workflows/python/code-quality.yml
T
Brian Bjarke Jensen 243a5432d8
Test CI Templates / validate-syntax (push) Successful in 11s
Test CI Templates / test-python-code-quality (3.11) (push) Failing after 5s
Test CI Templates / test-python-pytest (true, 3.12) (push) Failing after 4s
Test CI Templates / test-web-formatting (true, false, 20) (push) Failing after 5s
Test CI Templates / test-python-code-quality (3.10) (push) Failing after 5s
Test CI Templates / test-python-code-quality (3.12) (push) Failing after 5s
Test CI Templates / test-python-code-quality (false, false, basic) (push) Failing after 5s
Test CI Templates / test-python-code-quality (false, true, skip-pyupgrade) (push) Failing after 5s
Test CI Templates / test-python-pytest (false, 3.11) (push) Failing after 5s
Test CI Templates / test-python-pytest (false, 3.12) (push) Failing after 5s
Test CI Templates / test-python-pytest (true, 3.11) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, false, 20) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, true, 18) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, true, 20) (push) Failing after 5s
Test CI Templates / test-web-formatting (true, false, 18) (push) Failing after 5s
Test CI Templates / test-monorepo (push) Failing after 5s
Test CI Templates / test-web-formatting (true, true, 18) (push) Failing after 5s
Test CI Templates / test-web-formatting (true, true, 20) (push) Failing after 5s
Test CI Templates / test-results (push) Successful in 2s
Test CI Templates / test-python-code-quality (true, false, skip-mypy) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, false, 18) (push) Failing after 5s
Test CI Templates / test-edge-cases (push) Failing after 5s
fixed tests
2025-09-19 20:25:51 +02:00

80 lines
1.9 KiB
YAML

---
name: Python Code Quality Pipeline
"on":
workflow_call:
inputs:
python-version:
description: 'Python version to use (e.g., "3.12")'
required: false
type: string
default: "3.12"
working-directory:
description: 'Working directory for the project'
required: false
type: string
default: "."
skip-mypy:
description: 'Skip mypy type checking'
required: false
type: boolean
default: false
skip-pyupgrade:
description: 'Skip pyupgrade check'
required: false
type: boolean
default: false
uv-extras:
description: 'UV extras to install (e.g., "dev,test")'
required: false
type: string
default: "all-extras"
jobs:
code-quality:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install uv
run: pip install uv
- name: Install dependencies
env:
UV_LINK_MODE: copy
run: |
if [ "${{ inputs.uv-extras }}" = "all-extras" ]; then
uv sync --all-extras
else
uv sync --extra ${{ inputs.uv-extras }}
fi
- name: Type check with mypy
if: ${{ !inputs.skip-mypy }}
run: uv run mypy .
- name: Ruff lint
run: uv run ruff check .
- name: Ruff format
run: uv run ruff format --check .
- name: Pyupgrade check
if: ${{ !inputs.skip-pyupgrade }}
run: |
echo "Running pyupgrade..."
uv run pyupgrade --py312-plus $(git ls-files '*.py')
echo "Checking for changes..."
git diff --exit-code