Complete PR validation pipeline for Python projects.
jobs:
validate:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0Runs complete validation pipeline:
- Dependency Manager: Install dependencies with caching
- Ruff: Code linting (parallel with mypy)
- Mypy: Type checking (parallel with ruff)
- Pytest: Test execution with coverage reporting
- SBOM: Software Bill of Materials (optional, for compliance)
| Input | Type | Default | Description |
|---|---|---|---|
python-version |
string | '3.12' |
Python version to use |
working-directory |
string | '.' |
Working directory |
dependency-manager |
string | 'poetry' |
Dependency manager (poetry, uv, venv) |
poetry-version |
string | '2.2.0' |
Poetry version (if using poetry) |
run-ruff |
boolean | true |
Enable ruff linting |
run-mypy |
boolean | true |
Enable mypy type checking |
run-pytest |
boolean | true |
Enable pytest execution |
run-pytest-cov |
boolean | true |
Enable pytest with coverage |
run-sbom |
boolean | false |
Enable SBOM generation |
jobs:
validate:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0Runs: dependency install, ruff, mypy, pytest with coverage
jobs:
validate:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
python-version: '3.11'jobs:
validate:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
dependency-manager: 'uv'jobs:
validate:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
run-mypy: falsejobs:
validate:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
run-sbom: trueUseful for Digital Healthcare and regulated industries.
jobs:
api:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
working-directory: './services/api'
worker:
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
working-directory: './services/worker'jobs:
validate:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
uses: whisller/forge-ci/.github/workflows/forge-ci-python-validate-pr.yml@v1.2.0
with:
python-version: ${{ matrix.python-version }}dependency-manager → ruff/mypy (parallel) → pytest → sbom (if enabled)
- Ruff and mypy run in parallel after dependencies are installed
- Pytest runs after both linting and type checking complete
- SBOM runs last (only if enabled)
For custom composition, use individual workflows: