-
Notifications
You must be signed in to change notification settings - Fork 14
92 lines (87 loc) · 2.83 KB
/
run_tests.yml
File metadata and controls
92 lines (87 loc) · 2.83 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
name: _run-tests
on:
workflow_call:
inputs:
marker:
description: 'pytest -m expression (e.g., `not integration` or `integration`)'
required: true
type: string
secrets: { }
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# If set, uv will run without updating the uv.lock file. Equivalent to the `uv run --frozen`.
UV_FROZEN: "1"
jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
- name: Run linter
run: make lint
typecheck:
name: Type Check (ty)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
- name: Run type checker
run: make typecheck
# ── Non-video tests (chat, feeds, etc.) ────────────────────────────
# Uses STREAM_CHAT_* credentials which do NOT have video enabled.
# Video paths and manual test paths are defined in the Makefile.
test-non-video:
name: Non-video tests (${{ matrix.python-version }})
environment:
name: ci
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
env:
STREAM_API_KEY: ${{ vars.STREAM_CHAT_API_KEY }}
STREAM_API_SECRET: ${{ secrets.STREAM_CHAT_API_SECRET }}
STREAM_BASE_URL: ${{ vars.STREAM_CHAT_BASE_URL }}
run: make test MARKER="${{ inputs.marker }}"
# ── Video tests (video-enabled credentials) ─────────────────────
# Uses STREAM_* credentials which have video enabled.
test-video:
name: Video tests (${{ matrix.python-version }})
environment:
name: ci
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install dependencies
uses: ./.github/actions/python-uv-setup
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
env:
STREAM_API_KEY: ${{ vars.STREAM_API_KEY }}
STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
STREAM_BASE_URL: ${{ vars.STREAM_BASE_URL }}
run: make test-video MARKER="${{ inputs.marker }}"