Skip to content

Commit 51be352

Browse files
committed
ci: add workflows verifying compatibility with tools, docs, and agent builder
1 parent 912e110 commit 51be352

File tree

3 files changed

+141
-0
lines changed

3 files changed

+141
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Verify Agent Builder Compatibility
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-dependency:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- name: Checkout sdk-python
18+
uses: actions/checkout@v4
19+
with:
20+
path: sdk-python
21+
- name: Checkout Agent Builder Repository
22+
uses: actions/checkout@v4
23+
with:
24+
repository: strands-agents/agent-builder
25+
path: agent-builder
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Install dependencies
31+
run: |
32+
pip install --no-cache-dir hatch
33+
- name: Patch agent-builder dependency on tools and test
34+
run: |
35+
cd agent-builder
36+
37+
sed -i "s|.*strands-agents\[ollama\].*|\"strands-agents[ollama] @ file://${GITHUB_WORKSPACE}/sdk-python\",|" pyproject.toml
38+
count=$(grep -c "strands-agents\[ollama\] @ file://${GITHUB_WORKSPACE}/sdk-python" pyproject.toml)
39+
40+
if [ "$count" -eq 2 ]; then
41+
echo "Dependency found exactly twice in pyproject.toml"
42+
else
43+
echo "Dependency found $count times, expected 2"
44+
exit 1
45+
fi
46+
47+
hatch run test
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Verify Docs Compatibility
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-dependency:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- name: Checkout sdk-python
18+
uses: actions/checkout@v4
19+
with:
20+
path: sdk-python
21+
- name: Checkout Tools Repository
22+
uses: actions/checkout@v4
23+
with:
24+
repository: strands-agents/docs
25+
path: docs
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
- name: Patch tools dependency sdk-python and test
31+
run: |
32+
cd docs
33+
sed -i "s|.*strands-agents.*|strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python|" requirements.txt
34+
count=$(grep -c "strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python" requirements.txt)
35+
if [ "$count" -eq 1 ]; then
36+
echo "Dependency found exactly once in requirements.txt"
37+
else
38+
echo "Dependency found $count times, expected 1"
39+
exit 1
40+
fi
41+
pip install -r requirements.txt
42+
mkdocs build --strict
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Verify Tools Compatibility
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
jobs:
10+
test-dependency:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- name: Checkout sdk-python
18+
uses: actions/checkout@v4
19+
with:
20+
path: sdk-python
21+
- name: Checkout Tools Repository
22+
uses: actions/checkout@v4
23+
with:
24+
repository: strands-agents/tools
25+
path: tools
26+
- name: Checkout Agent Builder Repository
27+
uses: actions/checkout@v4
28+
with:
29+
repository: strands-agents/agent-builder
30+
path: agent-builder
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v4
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- name: Install dependencies
36+
run: |
37+
pip install --no-cache-dir hatch
38+
- name: Patch tools dependency on sdk-python and test
39+
run: |
40+
cd tools
41+
42+
sed -i "s|.*strands-agents>.*|\"strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python/\",|" pyproject.toml
43+
44+
count=$(grep -c "strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python" pyproject.toml)
45+
if [ "$count" -eq 2 ]; then
46+
echo "Dependency found exactly twice in pyproject.toml"
47+
else
48+
echo "Dependency found $count times, expected 2"
49+
exit 1
50+
fi
51+
52+
hatch run test

0 commit comments

Comments
 (0)