mirror of
https://github.com/anthropics/claude-quickstarts.git
synced 2026-12-06 15:09:22 +08:00
Fix CI workflow path configurations
- Remove working-directory defaults and use explicit paths instead - Fix ruff src paths to use correct relative paths - Update pip install and test execution to use proper directory navigation - This should resolve the import errors and path issues in CI
This commit is contained in:
23
.github/workflows/tests-agents.yaml
vendored
23
.github/workflows/tests-agents.yaml
vendored
@@ -13,19 +13,13 @@ on:
|
||||
jobs:
|
||||
ruff:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: agents
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/ruff-action@v1
|
||||
with:
|
||||
src: "./agents"
|
||||
src: "agents"
|
||||
pyright:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: agents
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
@@ -33,18 +27,16 @@ jobs:
|
||||
cache: "pip"
|
||||
python-version: "3.11.6"
|
||||
- run: |
|
||||
cd agents
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install mcp nest_asyncio
|
||||
- run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
|
||||
pip install mcp nest_asyncio anthropic
|
||||
- run: echo "$PWD/agents/.venv/bin" >> $GITHUB_PATH
|
||||
- uses: jakebailey/pyright-action@v1
|
||||
with:
|
||||
working-directory: agents
|
||||
test-script:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: agents
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
@@ -52,10 +44,13 @@ jobs:
|
||||
cache: "pip"
|
||||
python-version: "3.11.6"
|
||||
- run: |
|
||||
cd agents
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install anthropic mcp nest_asyncio
|
||||
- run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
|
||||
- run: python test_message_params.py || echo "Tests are allowed to fail for now"
|
||||
- run: |
|
||||
cd agents
|
||||
source .venv/bin/activate
|
||||
python test_message_params.py || echo "Tests are allowed to fail for now"
|
||||
env:
|
||||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
2
.github/workflows/tests.yaml
vendored
2
.github/workflows/tests.yaml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/ruff-action@v1
|
||||
with:
|
||||
src: "./computer-use-demo"
|
||||
src: "computer-use-demo"
|
||||
pyright:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
|
||||
Reference in New Issue
Block a user