Skip to content

v0.3.41: P0-P2 hardening complete - Pydantic save validation, rendere… #47

v0.3.41: P0-P2 hardening complete - Pydantic save validation, rendere…

v0.3.41: P0-P2 hardening complete - Pydantic save validation, rendere… #47

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run ruff linter
run: ruff check .
- name: Run ruff formatter
run: ruff format --check .
- name: Run mypy type checking
run: mypy src/
- name: Security scan
run: |
pip install bandit==1.9.0
bandit -r src/ -ll
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with coverage
env:
SDL_VIDEODRIVER: dummy
run: |
pytest tests/ \
--cov=src/pycc2 \
--cov-report=xml \
--cov-report=html \
--junitxml=junit.xml
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: |
junit.xml
htmlcov/