-
Notifications
You must be signed in to change notification settings - Fork 91
203 lines (193 loc) · 6.21 KB
/
Copy pathci.yml
File metadata and controls
203 lines (193 loc) · 6.21 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: CI
permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
python-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
# Pin ruff: 0.16.0 (released 2026-07-23) turned on a large new rule
# surface that flags ~460 pre-existing findings across the repo and
# breaks CI on every PR. Pinned to the last green version; bump only
# once those findings are addressed (see python-sdk-test for the twin).
pip install ruff==0.15.22 mypy
if [ -f examples/python/requirements.txt ]; then pip install -r examples/python/requirements.txt; fi
- name: Lint with ruff
run: ruff check . --extend-exclude '**/*.ipynb'
- name: Type check with mypy
run: mypy examples/python apps/pipecat-moss apps/livekit-moss-vercel --ignore-missing-imports --exclude "apps/pipecat-moss/hume-ollama-local/create_index.py"
javascript-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: |
package-lock.json
examples/javascript/package-lock.json
apps/next-js/package-lock.json
- name: Install root dependencies
run: npm ci
- name: Install examples/javascript dependencies
working-directory: examples/javascript
run: npm ci
- name: Install apps/next-js dependencies
working-directory: apps/next-js
run: npm ci
- name: Lint (examples/javascript + apps/next-js)
run: npm run lint
- name: Type check (examples/javascript + apps/next-js)
run: npm run type-check
cookbook-langchain-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install package
working-directory: examples/cookbook/langchain
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest
- name: Run tests
working-directory: examples/cookbook/langchain
run: pytest -v
python-sdk-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install SDK with dev dependencies
working-directory: sdks/python/sdk
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Lint with ruff
working-directory: sdks/python/sdk
run: |
pip install ruff==0.15.22 # pinned; see python-lint job for why (ruff 0.16.0 regression)
ruff check src/ tests/
- name: Type check with mypy
working-directory: sdks/python/sdk
run: mypy src/ --ignore-missing-imports
- name: Run tests
working-directory: sdks/python/sdk
run: pytest tests/ -v
next-js-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: apps/next-js/package-lock.json
- name: Install dependencies
working-directory: apps/next-js
run: npm ci
- name: Build
working-directory: apps/next-js
env:
NEXT_PUBLIC_MOSS_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_MOSS_PROJECT_ID }}
NEXT_PUBLIC_MOSS_PROJECT_KEY: ${{ secrets.NEXT_PUBLIC_MOSS_PROJECT_KEY }}
run: npm run build
- name: Run tests
working-directory: apps/next-js
run: npm test
vercel-sdk-test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- node-version: '20'
ai-version: '^6.0.0'
- node-version: '22'
ai-version: '7.0.8'
name: vercel-sdk-test (ai@${{ matrix.ai-version }}, node@${{ matrix.node-version }})
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: packages/vercel-sdk/package-lock.json
- name: Install dependencies
working-directory: packages/vercel-sdk
run: npm ci
- name: Override ai version
working-directory: packages/vercel-sdk
run: npm install --no-save ai@${{ matrix.ai-version }}
- name: Build
working-directory: packages/vercel-sdk
run: npm run build
- name: Run tests
working-directory: packages/vercel-sdk
run: npm test
vitepress-plugin-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
working-directory: packages/vitepress-plugin-moss
run: pnpm install --frozen-lockfile
- name: Build
working-directory: packages/vitepress-plugin-moss
run: pnpm build
- name: Run tests
working-directory: packages/vitepress-plugin-moss
run: pnpm test
agora-ten-samples-smoke:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install smoke deps
run: |
python -m pip install --upgrade pip
pip install pytest pytest-asyncio fastapi httpx pydantic python-dotenv
- name: TEN graph + bench unit tests
run: |
pytest apps/ten-moss/tests apps/ten-moss/bench/test_run.py -v
- name: custom-llm mock/doctor tests
run: |
pytest apps/agora-custom-llm-moss/tests -v
- name: Echo-grounding table (no LLM keys)
run: |
python apps/ten-moss/bench/run.py --echo-grounding