Skip to content

Commit 05af8d6

Browse files
fix(api): require patched JWT and HTTP dependencies
1 parent 96c5b1a commit 05af8d6

5 files changed

Lines changed: 1138 additions & 298 deletions

File tree

‎.github/workflows/test-api.yml‎

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ on:
2626

2727
jobs:
2828
failover:
29+
name: API (Python ${{ matrix.python-version }})
2930
runs-on: ubuntu-latest
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
3035
services:
3136
mock-server:
3237
image: livekit/test-server:latest
@@ -42,7 +47,7 @@ jobs:
4247

4348
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
4449
with:
45-
python-version: "3.12"
50+
python-version: ${{ matrix.python-version }}
4651

4752
- name: Install uv
4853
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
@@ -51,7 +56,8 @@ jobs:
5156
run: |
5257
uv venv .failover-venv
5358
source .failover-venv/bin/activate
54-
uv pip install ./livekit-protocol ./livekit-api pytest aiohttp
59+
uv pip install ./livekit-protocol ./livekit-api "pytest>=9.0.3; python_version >= '3.10'" "pytest==8.4.2; python_version < '3.10'"
60+
uv pip check
5561
5662
- name: Wait for mock server
5763
run: |
@@ -64,4 +70,42 @@ jobs:
6470
- name: Run API tests
6571
run: |
6672
source .failover-venv/bin/activate
67-
pytest tests/api -v
73+
# Use a private directory instead of pytest's shared /tmp default.
74+
pytest tests/api -v --basetemp="$(mktemp -d)"
75+
76+
wheels:
77+
name: API wheels (${{ matrix.os }}, Python ${{ matrix.python-version }}, ${{ matrix.resolution }})
78+
runs-on: ${{ matrix.os }}
79+
strategy:
80+
fail-fast: false
81+
matrix:
82+
os: [macos-latest, windows-latest]
83+
python-version: ["3.9", "3.14"]
84+
resolution: [lowest-direct, highest]
85+
steps:
86+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
87+
88+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
89+
with:
90+
python-version: ${{ matrix.python-version }}
91+
92+
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
93+
94+
- name: Build and install distributions
95+
shell: bash
96+
run: |
97+
uv build --package livekit-api --out-dir dist
98+
uv build --package livekit-protocol --out-dir dist
99+
uv venv .api-wheel-venv
100+
uv pip install --python .api-wheel-venv --resolution '${{ matrix.resolution }}' dist/*.whl "pytest>=9.0.3; python_version >= '3.10'" "pytest==8.4.2; python_version < '3.10'"
101+
uv pip check --python .api-wheel-venv
102+
103+
- name: Test token and webhook compatibility
104+
shell: bash
105+
run: |
106+
if [ "$RUNNER_OS" = Windows ]; then
107+
test_python=.api-wheel-venv/Scripts/python.exe
108+
else
109+
test_python=.api-wheel-venv/bin/python
110+
fi
111+
"$test_python" -m pytest tests/api/test_access_token.py tests/api/test_webhook.py -v --basetemp="$RUNNER_TEMP/pytest-api"

0 commit comments

Comments
 (0)