Skip to content

chore: add PR template for consistent PR descriptions (#31) #29

chore: add PR template for consistent PR descriptions (#31)

chore: add PR template for consistent PR descriptions (#31) #29

Workflow file for this run

name: CI
on:
pull_request:
branches: [main, develop, "release/*"]
push:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint
runs-on: ${{ vars.RUNNER_LABEL || 'blacksmith-2vcpu-ubuntu-2404' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install ruff
- run: ruff check .
- run: ruff format --check .
typecheck:
name: Type Check
runs-on: ${{ vars.RUNNER_LABEL || 'blacksmith-2vcpu-ubuntu-2404' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install -e ".[dev]" mypy types-PyYAML
env:
PIP_INDEX_URL: https://pypi.org/simple
- run: mypy src/narrator_ai --ignore-missing-imports
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ${{ vars.RUNNER_LABEL || 'blacksmith-2vcpu-ubuntu-2404' }}
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[dev]" pytest-cov
env:
PIP_INDEX_URL: https://pypi.org/simple
- run: pytest -v --tb=short --cov=narrator_ai --cov-report=term --cov-report=xml --cov-fail-under=20
security:
name: Security Scan
runs-on: ${{ vars.RUNNER_LABEL || 'blacksmith-2vcpu-ubuntu-2404' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install --upgrade pip
- run: pip install pip-audit bandit
- name: Install project
run: pip install -e ".[dev]"
env:
PIP_INDEX_URL: https://pypi.org/simple
- name: Audit dependencies
run: pip-audit --desc --skip-editable
- run: bandit -r src/narrator_ai -c pyproject.toml