-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (42 loc) · 1.52 KB
/
Copy pathci.yml
File metadata and controls
44 lines (42 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Rust toolchain (needed if ruff must be built from source)
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
# Install runtime and test dependencies (skip dev extras that require ruff)
python -m pip install -e .
python -m pip install pytest pytest-asyncio pytest-json-report httpx
# Install linters required by the workflow
python -m pip install black mypy types-aiofiles
# Optional: try to pre-install ruff (prefer binary) but don't fail if unavailable
python -m pip install "ruff>=0.16.0" --prefer-binary --index-url https://pypi.org/simple || true
- name: Run linters and type checks
run: |
# Ruff for linting (optional: skip if not installed)
python -m ruff check . || echo "ruff not available; skipping ruff checks"
# Black check
python -m black --check .
# Mypy type check
python -m mypy src --ignore-missing-imports --explicit-package-bases
- name: Run tests
run: |
python -m pytest -q