forked from usemoss/moss
-
Notifications
You must be signed in to change notification settings - Fork 0
166 lines (157 loc) · 4.72 KB
/
Copy pathci.yml
File metadata and controls
166 lines (157 loc) · 4.72 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
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
pip install ruff 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
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
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: packages/vercel-sdk/package-lock.json
- name: Install dependencies
working-directory: packages/vercel-sdk
run: npm ci
- 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