-
Notifications
You must be signed in to change notification settings - Fork 151
ci: add workflows verifying compatibility with tools, docs, and agent… #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
51be352
d4eea13
3d2d5ff
d1e3a7b
1bb92f4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Verify Agent Builder Compatibility | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test-dependency: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Checkout sdk-python | ||
uses: actions/checkout@v4 | ||
with: | ||
path: sdk-python | ||
- name: Checkout Agent Builder Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: strands-agents/agent-builder | ||
path: agent-builder | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install --no-cache-dir hatch | ||
- name: Patch agent-builder dependency on tools and test | ||
run: | | ||
cd agent-builder | ||
|
||
sed -i "s|.*strands-agents\[ollama\].*|\"strands-agents[ollama] @ file://${GITHUB_WORKSPACE}/sdk-python\",|" pyproject.toml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of updating the pyproject.toml, should we just add another target for pulling a local install? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you mean something like the following in the tools repo
I thought about this but it leaves the workflow specific test logic in the pyproject which seemed odd to me. I can update if you think thats better than hiding the oddness in the workflow There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to see if I can do this with an env var actually |
||
count=$(grep -c "strands-agents\[ollama\] @ file://${GITHUB_WORKSPACE}/sdk-python" pyproject.toml) | ||
|
||
if [ "$count" -eq 2 ]; then | ||
echo "Dependency found exactly twice in pyproject.toml" | ||
else | ||
echo "Dependency found $count times, expected 2" | ||
exit 1 | ||
fi | ||
|
||
hatch run test | ||
dbschmigelski marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Verify Docs Compatibility | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test-dependency: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Checkout sdk-python | ||
uses: actions/checkout@v4 | ||
with: | ||
path: sdk-python | ||
- name: Checkout Tools Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: strands-agents/docs | ||
path: docs | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Patch tools dependency sdk-python and test | ||
run: | | ||
cd docs | ||
sed -i "s|.*strands-agents.*|strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python|" requirements.txt | ||
count=$(grep -c "strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python" requirements.txt) | ||
if [ "$count" -eq 1 ]; then | ||
echo "Dependency found exactly once in requirements.txt" | ||
else | ||
echo "Dependency found $count times, expected 1" | ||
exit 1 | ||
fi | ||
pip install -r requirements.txt | ||
mkdocs build --strict |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Verify Tools Compatibility | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test-dependency: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Checkout sdk-python | ||
uses: actions/checkout@v4 | ||
with: | ||
path: sdk-python | ||
- name: Checkout Tools Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: strands-agents/tools | ||
path: tools | ||
- name: Checkout Agent Builder Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: strands-agents/agent-builder | ||
path: agent-builder | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install --no-cache-dir hatch | ||
- name: Patch tools dependency on sdk-python and test | ||
run: | | ||
cd tools | ||
sed -i "s|.*strands-agents>.*|\"strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python/\",|" pyproject.toml | ||
|
||
count=$(grep -c "strands-agents @ file://${GITHUB_WORKSPACE}/sdk-python" pyproject.toml) | ||
if [ "$count" -eq 2 ]; then | ||
echo "Dependency found exactly twice in pyproject.toml" | ||
else | ||
echo "Dependency found $count times, expected 2" | ||
exit 1 | ||
fi | ||
|
||
hatch run test |
Uh oh!
There was an error while loading. Please reload this page.