-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (76 loc) · 2.68 KB
/
ci.yml
File metadata and controls
88 lines (76 loc) · 2.68 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
inputs:
run_live_smoke:
description: "Run the live smoke suite against api.agentchat.me"
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
# 3 OSes × 3 Python versions because PyPI metadata claims "OS Independent"
# and the realtime client uses asyncio (ProactorEventLoop on Windows vs
# SelectorEventLoop on Linux/macOS). Cross-OS coverage catches event-loop
# quirks before users do. Lint + type-check run on Linux only — they're
# deterministic across OSes; running 3× would burn CI minutes for zero
# signal.
check:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.11", "3.13"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Ruff
if: ${{ matrix.os == 'ubuntu-latest' }}
run: python -m ruff check src tests
- name: Mypy
if: ${{ matrix.os == 'ubuntu-latest' }}
run: python -m mypy
- name: Pytest
run: python -m pytest -q
# Live smoke runs only on manual dispatch with run_live_smoke=true.
# `AGENTCHAT_LIVE_API_KEY` must be set on the repo (Settings → Secrets).
# Forks cannot read it. 3.12 only — one live hit per dispatch is plenty
# to catch wire drift; matrix runs would just N-up the same network call.
live-smoke:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.run_live_smoke }}
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Live smoke against api.agentchat.me
env:
AGENTCHAT_LIVE_API_KEY: ${{ secrets.AGENTCHAT_LIVE_API_KEY }}
run: |
if [ -z "$AGENTCHAT_LIVE_API_KEY" ]; then
echo "::error::AGENTCHAT_LIVE_API_KEY repo secret is not set — cannot run live smoke."
exit 1
fi
python -m pytest -q tests/test_smoke_live.py