-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.69 KB
/
Copy pathpython.yml
File metadata and controls
59 lines (50 loc) · 1.69 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
# Lint + test the Python trees: the protocol client/types package (python/) AND the
# native async WebSocket server (python/server/). Both are uv projects. The live
# gateway E2E (tests/test_e2e_live.py) is skipif-marked and skips cleanly without
# SMOOTH_AGENT_E2E + SMOOAI_GATEWAY_KEY, so this job needs no secrets. spec/ is a
# trigger path because the conformance tests validate against spec/conformance/fixtures.json.
name: Python
on:
push:
branches: [main]
paths:
- 'python/**'
- 'spec/**'
- '.github/workflows/python.yml'
pull_request:
paths:
- 'python/**'
- 'spec/**'
- '.github/workflows/python.yml'
concurrency:
group: python-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
project:
- python # the protocol client + generated types
- python/server # the native async WebSocket server
defaults:
run:
working-directory: ${{ matrix.project }}
steps:
- uses: actions/checkout@v4
- name: Set up uv (with cache)
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Sync (install deps + dev group)
run: uv sync
- name: Ruff lint
run: uv run ruff check .
- name: Ruff format check
run: uv run ruff format --check .
- name: Pytest
run: uv run pytest