-
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (101 loc) · 3.94 KB
/
Copy path_checks.yml
File metadata and controls
106 lines (101 loc) · 3.94 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
100
101
102
103
104
105
106
name: checks
on:
workflow_call: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: extractions/setup-just@v4
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install 3.10
- run: uv python pin 3.10
- run: just install lint-ci
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: extractions/setup-just@v4
- uses: astral-sh/setup-uv@v8.2.0
- run: just docs-build
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v6
- uses: extractions/setup-just@v4
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: uv python pin ${{ matrix.python-version }}
- run: just install
- run: just test . --cov=. --cov-report xml
free-threaded:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.13t"
extras: "logging,sentry,fastapi,faststream,fastapi-metrics,faststream-metrics,otl-http"
- python-version: "3.14t"
extras: "logging,sentry,fastapi,litestar,faststream,fastmcp,fastapi-metrics,litestar-metrics,faststream-metrics,fastmcp-metrics,otl-http"
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install ${{ matrix.python-version }}
- run: uv venv --python ${{ matrix.python-version }}
- name: Install core + ft-ready extras (orjson/otl-grpc/pyroscope excluded; otl-http included; litestar/fastmcp 3.14t-only)
run: uv pip install ".[${{ matrix.extras }}]"
- name: Free-threaded smoke test
run: .venv/bin/python scripts/ft_smoke.py
install-isolation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- run: uv python install 3.10
- name: Each extra installs and imports in isolation
run: |
set -uo pipefail
# GitHub runs run-steps with `bash -eo pipefail`; disable errexit so a
# venv-create/cleanup hiccup can't abort the loop before every extra is
# checked — failures are collected explicitly in `failed` below.
set +e
extras="orjson sentry pyroscope otl otl-http logging free-all \
fastapi fastapi-sentry fastapi-otl fastapi-logging fastapi-metrics fastapi-all \
litestar litestar-sentry litestar-otl litestar-logging litestar-metrics litestar-all \
faststream faststream-sentry faststream-otl faststream-logging faststream-metrics faststream-all \
fastmcp fastmcp-metrics fastmcp-all"
failed=""
uv venv --python 3.10 .v-bare >/dev/null
if uv pip install --python .v-bare/bin/python . >/dev/null 2>&1 \
&& .v-bare/bin/python -c "import lite_bootstrap"; then :; else failed="$failed __bare__"; fi
rm -rf .v-bare
for e in $extras; do
uv venv --python 3.10 ".v-$e" >/dev/null
if uv pip install --python ".v-$e/bin/python" ".[$e]" >/dev/null 2>&1 \
&& ".v-$e/bin/python" -c "import lite_bootstrap"; then :; else failed="$failed $e"; fi
rm -rf ".v-$e"
done
if [ -n "$failed" ]; then echo "::error::extras failed isolated install+import:$failed"; exit 1; fi
echo "all extras install and import in isolation"