From 6ae60d9cb6a165ab497f00b430b21669eef18de0 Mon Sep 17 00:00:00 2001 From: clementpoiret Date: Tue, 29 Oct 2024 12:47:59 +0100 Subject: [PATCH] fix(action): pytest and coverage --- .github/workflows/python-app.yml | 9 ++------- devenv.nix | 7 +++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 16e929f..dea43e6 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,13 +27,8 @@ jobs: - name: Install devenv.sh run: nix profile install nixpkgs#devenv - - name: Run tests - shell: devenv shell bash -e {0} - run: | - uv sync - uv pip install onnxruntime>=1.8.0 deepsparse>=1.4.0 - uv run coverage run --source=hsf -m pytest - uv run coverage xml + - name: Run Tests and Coverage + run: devenv shell pytestcoverage - name: Publish Coverage on CodeClimate uses: paambaati/codeclimate-action@v3.0.0 diff --git a/devenv.nix b/devenv.nix index a801367..4c8e4de 100644 --- a/devenv.nix +++ b/devenv.nix @@ -28,4 +28,11 @@ in { enterTest = '' uv run pytest ''; + + scripts.pytestcoverage.exec = '' + uv sync + uv pip install onnxruntime>=1.8.0 deepsparse>=1.4.0 + uv run coverage run --source=hsf -m pytest + uv run coverage xml + ''; }