From ada16392aaa218a51bf4bbc777f5621954724332 Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Thu, 25 Jan 2024 16:12:07 +0100 Subject: [PATCH] Add basic code coverage report for unit tests --- .github/workflows/unit-tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c886876b4..32fe8e860 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -29,8 +29,14 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install -r requirements.txt + python -m pip install coveragepy==1.6.0 - name: Run unit tests run: | cd unit-tests - python2 -m unittest unit_tests + coverage run --omit=test_*.py,unit_tests.py --source=$(cd .. ; pwd),$(cd ../util ; pwd) -m unittest unit_tests + + - name: Report code coverage + run: | + cd unit-tests + coverage report