From 8e55594da6f71d31cf8cd7465dac0110b9df3c88 Mon Sep 17 00:00:00 2001 From: Noam Gat Date: Tue, 17 Oct 2023 08:36:39 +0300 Subject: [PATCH] Fixing coverage part of github action --- .github/workflows/run_tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 1ab8bd8..41062e7 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,3 +1,4 @@ +# Based on https://jacobian.org/til/github-actions-poetry/ # Run this job on pushes to `main`, and for pull requests. If you don't specify # `branches: [main], then this actions runs _twice_ on pull requests, which is # annoying. @@ -54,7 +55,7 @@ jobs: # And finally run tests. I'm using pytest and all my pytest config is in my `pyproject.toml` # so this line is super-simple. But it could be as complex as you need. - - run: poetry run pytest + - run: poetry run coverage run -m pytest # Calculate coverage xml after running tests - run: poetry run coverage xml