name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: windows-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v1
- name: Install dependencies
run: |
uv sync --all-extras
- name: Lint with flake8
run: |
uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
- name: Type check with mypy
run: |
uv run mypy server.py --ignore-missing-imports
- name: Test with pytest
run: |
uv run pytest tests/ -v --tb=short
if: always()
- name: Check code formatting
run: |
uv run black --check .
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run security scan
uses: pypa/gh-action-pip-audit@v1.0.8
with:
inputs: requirements.txt