Repository navigation
169 lines (159 loc) · 6.27 KB
/
Copy pathci.yml
File metadata and controls
169 lines (159 loc) · 6.27 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
# Batch documentation requires this runtime commit until its next release.
SUBMILLI_RUNTIME_REF: "1f1377033809fe459354f7ec8f1787cd1fe5e845"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
- run: uv sync --all-packages --all-groups --locked
- run: uv run ruff check .
- run: uv run ruff format --check .
- name: The sync client matches the async one
run: uv run python packages/submilli/scripts/generate_sync.py --check
types:
runs-on: ubuntu-latest
strategy:
matrix:
package:
- { dir: submilli, module: submilli }
- { dir: langchain-submilli, module: langchain_submilli }
- { dir: openai-agents-submilli, module: openai_agents_submilli }
defaults:
run:
working-directory: packages/${{ matrix.package.dir }}
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
- run: uv sync --all-packages --all-groups --locked
- run: uv run mypy
- run: uv run pyright
- name: The public API is fully typed
run: uv run pyright --verifytypes ${{ matrix.package.module }} --ignoreexternal
unit:
runs-on: ubuntu-latest
strategy:
matrix:
package: [submilli, langchain-submilli, openai-agents-submilli]
python: ["3.11", "3.12", "3.13", "3.14"]
exclude:
# langchain-submilli is tested on the Pythons its dependencies support.
- { package: langchain-submilli, python: "3.14" }
defaults:
run:
working-directory: packages/${{ matrix.package }}
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
with:
python-version: ${{ matrix.python }}
- run: uv sync --all-packages --all-groups --locked
- run: uv run pytest
integration:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { package: submilli, tests: tests/integration }
# Tests that need the research Blueprint's Packages are skipped here.
- { package: langchain-submilli, tests: tests/integration_tests }
- { package: openai-agents-submilli, tests: tests/integration_tests }
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
- uses: actions/checkout@v7
with:
repository: submilli/submilli-runtime
ref: ${{ env.SUBMILLI_RUNTIME_REF }}
path: runtime
- uses: dtolnay/rust-toolchain@1.98.1
- name: Build the runtime with batch documentation
run: cargo build --locked --release -p submilli-server
working-directory: runtime
env:
CARGO_BUILD_JOBS: "2"
- run: uv sync --all-packages --all-groups --locked
- run: uv run pytest ${{ matrix.tests }} -m 'not durable and not function_docs'
working-directory: packages/${{ matrix.package }}
env:
SUBMILLI_BIN: ${{ github.workspace }}/runtime/target/release
function-docs-integration:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
- uses: actions/checkout@v7
with:
repository: submilli/submilli-runtime
# SUB-2193 adds selective documentation after the released server.
ref: b2465b1a01db66461c41fb2314919542c770f72f
path: runtime
- uses: dtolnay/rust-toolchain@1.98.1
- name: Build server with selective function documentation
run: cargo build --release -p submilli-server
working-directory: runtime
env:
CARGO_BUILD_JOBS: "2"
- run: uv sync --all-packages --all-groups --locked
- name: Deep Agents cross-package discovery and execution
run: uv run pytest tests/integration_tests/test_function_docs.py
working-directory: packages/langchain-submilli
env:
SUBMILLI_BIN: ${{ github.workspace }}/runtime/target/release
durable-integration:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
- uses: actions/checkout@v7
with:
repository: submilli/submilli-runtime
# Durable callbacks landed after v0.4.3. Pin the tested upstream
# contract until a release containing them is available.
ref: 5f67954152a8fa812f64ffc9cb1d17cd4ccd82a8
path: runtime
- uses: dtolnay/rust-toolchain@1.98.1
- name: Build upstream submilli-server with durable callbacks
run: cargo build --release -p submilli-server
working-directory: runtime
env:
CARGO_BUILD_JOBS: "2"
- run: uv sync --all-packages --all-groups --locked
- name: SDK durable execution and crash recovery
run: uv run pytest tests/integration/test_durable.py
working-directory: packages/submilli
env:
SUBMILLI_BIN: ${{ github.workspace }}/runtime/target/release
- name: LangChain durable tools and approvals
run: uv run pytest tests/integration_tests/test_durable.py
working-directory: packages/langchain-submilli
env:
SUBMILLI_BIN: ${{ github.workspace }}/runtime/target/release
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.0
- run: uv build --all-packages
- name: Each wheel installs and imports on its own
run: |
uv run --isolated --no-project --with dist/submilli-*.whl python -c "import submilli"
uv run --isolated --no-project --with dist/submilli-*.whl --with dist/langchain_submilli-*.whl \
python -c "import langchain_submilli"
uv run --isolated --no-project --with dist/submilli-*.whl --with dist/openai_agents_submilli-*.whl \
python -c "import openai_agents_submilli"
- name: The integrations depend on submilli from PyPI, not the workspace
run: |
unzip -p dist/langchain_submilli-*.whl '*/METADATA' | grep -x 'Requires-Dist: submilli<0.2,>=0.1.4'
unzip -p dist/openai_agents_submilli-*.whl '*/METADATA' | grep -x 'Requires-Dist: submilli<0.2,>=0.1.4'