From 179b56fa8ca232db80e7fe2a7fcff52dad96e47c Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Thu, 25 Jan 2024 18:23:43 +0100 Subject: [PATCH] Add test coverage report for unit tests --- .github/workflows/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57c6391..7daa983 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt + pip install coveragepy==7.4.0 - name: Lint with flake8 run: | @@ -37,4 +38,9 @@ jobs: run: | python -m pip install --upgrade ./ cd unit-tests - python3 -m unittest unit_tests + coverage run --source=$(cd ../yclienttools ; pwd) -m unittest unit_tests + + - name: Print test coverage report + run: | + cd unit-tests + coverage report