From d17678b522df121c5c22c05c9b03e14c68e09c9e Mon Sep 17 00:00:00 2001 From: Teo Date: Sun, 29 Dec 2024 18:36:03 +0100 Subject: [PATCH] fix usage of uv run 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 --- .github/workflows/python-tests.yaml | 10 +++------- pyproject.toml | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-tests.yaml b/.github/workflows/python-tests.yaml index 903dd2f19..6ef3716cb 100644 --- a/.github/workflows/python-tests.yaml +++ b/.github/workflows/python-tests.yaml @@ -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 }} diff --git a/pyproject.toml b/pyproject.toml index 96247f74f..03a41a314 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,8 @@ langchain = [ [dependency-groups] test = [ "openai", - "langchain" + "langchain", + "coverage", ] dev = [