From aa15c7541127b170a597afe9900291007647defd Mon Sep 17 00:00:00 2001 From: Noam Gat Date: Tue, 17 Oct 2023 08:26:52 +0300 Subject: [PATCH] Adding coverage to test action --- .github/workflows/run_tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index ae2d969..1ab8bd8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -55,3 +55,14 @@ 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 + + # Calculate coverage xml after running tests + - run: poetry run coverage xml + + # Upload coverage xml to Codecov + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + +