-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (82 loc) · 2.48 KB
/
Copy pathci.yml
File metadata and controls
99 lines (82 loc) · 2.48 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: python-server-sdk
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
# The checks themselves live in the Makefile so that CI and the pre-push hook cannot drift
# apart. bash everywhere keeps the make recipes portable across the runner images.
defaults:
run:
shell: bash
jobs:
lint:
name: Lint + Typecheck
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: make verify-lock
- run: make lint
- run: make typecheck
test:
name: Test (Python ${{ matrix.python-version }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
# Backstop only. pytest-timeout is what turns a wedged test into a failure with a
# thread dump; this bounds anything outside pytest, such as a dependency install.
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- os: macos-latest
python-version: "3.13"
- os: windows-latest
python-version: "3.13"
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- run: make verify-lock
- run: make coverage
build:
name: Build distribution
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
# Builds into dist/, checks the metadata, and imports the wheel in a clean environment.
- run: make dist-check
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
samples:
name: Sample apps
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
# Each sample pins a released SDK from PyPI, so this checks the published wheel.
- run: make samples
# And again against this working tree, which is what catches a breaking API change before
# it ships. Both matter: the first can fail on a bad release, the second on a bad commit.
- run: make samples-local