Update verify-tools-compatibility.yml #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 |