From 2ecd70186d7c2ddfea28f99b4541b91257a5c289 Mon Sep 17 00:00:00 2001 From: Holger Mueller Date: Sun, 16 Feb 2020 10:05:53 +0100 Subject: [PATCH] switched from coverage to pytest-cov this will report test failures in pipeline --- .coveragerc | 20 ++++++++++++++++++++ .github/workflows/pythonapp.yml | 7 +++---- 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..e317bd4 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,20 @@ +[run] +# ignore GUI code atm. +omit = + NanoVNASaver/Analysis.py + NanoVNASaver/Calibration.py + NanoVNASaver/Chart.py + NanoVNASaver/Hardware.py + NanoVNASaver/Inputs.py + NanoVNASaver/Marker/Settings.py + NanoVNASaver/Marker/Values.py + NanoVNASaver/Marker/Widget.py + NanoVNASaver/Marker/__init__.py + NanoVNASaver/NanoVNASaver.py + NanoVNASaver/SweepWorker.py + NanoVNASaver/__init__.py + NanoVNASaver/__main__.py + NanoVNASaver/about.py +[report] +fail_under = 90.0 +show_missing = True diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml index 90a12c7..55a16be 100644 --- a/.github/workflows/pythonapp.yml +++ b/.github/workflows/pythonapp.yml @@ -21,8 +21,7 @@ jobs: run: | pip install pylint pylint --exit-zero NanoVNASaver - - name: Unittests + - name: Unittests / Coverage run: | - pip install coverage - coverage run ./test_master.py - coverage report --fail-under=90 -m --skip-covered + pip install pytest-cov + pytest --cov=NanoVNASaver