From 0db705e68a52bdde96d9993c010136d59b33cce8 Mon Sep 17 00:00:00 2001 From: Zevaryx Date: Wed, 5 May 2021 18:17:43 -0600 Subject: [PATCH] Use pytest to generate coverage --- .github/workflows/python-package.yml | 4 ++-- .gitlab-ci.yml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ba93886..6498e3c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -33,6 +33,6 @@ jobs: # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with unittest + - name: Test with pytest run: | - python3.10 -m unittest discover tests + python3.10 -m pytest --cov=calculator tests/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 297abbe..a021000 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,8 @@ cache: before_script: - python -V + - python -m pip install --upgrade pytest pytest-cov tests: script: - - python -m unittest discover tests + - python -m pytest --cov=calculator tests/