Skip to content

Commit

Permalink
fix usage of uv run
Browse files Browse the repository at this point in the history
uvx is intended to run tools in isolated environments which we don't
want to happen; we should use the ".venv" environment for running
coverage aswell

Signed-off-by: Teo <[email protected]>
  • Loading branch information
teocns committed Dec 29, 2024
1 parent f8376f3 commit d17678b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,11 @@ jobs:
run: |
uv sync --group test --group dev
- name: Install coverage tools
run: |
uv tool install coverage
- name: Run tests with coverage
run: |
uvx coverage run --source . -m pytest
uvx coverage report -m
uvx coverage xml
uv run -m coverage run --source . -m pytest
uv run -m coverage report -m
uv run -m coverage xml
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AGENTOPS_API_KEY: ${{ secrets.AGENTOPS_API_KEY }}
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ langchain = [
[dependency-groups]
test = [
"openai",
"langchain"
"langchain",
"coverage",
]

dev = [
Expand Down

0 comments on commit d17678b

Please sign in to comment.