-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.68 KB
/
Copy pathpython.yml
File metadata and controls
60 lines (49 loc) · 1.68 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: python
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
python:
name: python (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14]
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: "."
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: Set up Python
run: uv python install 3.11
- name: uv sync --all-extras --all-packages
run: uv sync --all-extras --all-packages
- name: Build ki_native (PyO3)
# `maturin develop` installs the wheel editable into the
# workspace .venv so kc_ping / kiserver can import it.
run: |
cd crates/ki
uv tool install maturin
VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv maturin develop --features python
- name: uv run ruff check
run: uv run ruff check services/
# mypy --strict has a large pre-existing backlog (~452 errors, mostly
# missing PEP 561 py.typed markers on first-party packages + the Any
# leakage that cascades from them, plus a multi-src-root module-resolution
# config issue). Clearing it is a dedicated follow-up; until then this step
# runs for signal but does not gate the workflow. Tracked: mypy-strict cleanup.
- name: uv run mypy --strict
run: uv run mypy services/
continue-on-error: true
- name: uv run pytest
run: uv run pytest services/