From 52bbd2e8879aa10f205fe7f48f18b6b7a363750e Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Sat, 20 Jun 2020 07:49:58 -0700 Subject: [PATCH] Attempt to add coverage.py to testing workflow. --- .github/workflows/python-package.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 51bd099..3874603 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Python package +name: Test coverage on: push: @@ -27,6 +27,7 @@ jobs: run: | python -m pip install --upgrade pip setuptools wheel pip install flake8 pytest + pip install coverage if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | @@ -36,5 +37,5 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pip install pytest - python -m pytest + coverage run -m pytest + coverage report -m