From a7ce2fb2f761be6291dd0e2bf9bb8d1ea57adb69 Mon Sep 17 00:00:00 2001 From: Cody Scott Date: Fri, 2 Feb 2024 15:13:54 -0500 Subject: [PATCH] CI check for 100 test coverage --- .github/workflows/python-package.yml | 9 +++++---- README.md | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 90c8274..ae3e48f 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,9 +28,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install pytest + python -m pip install --upgrade pip setuptools wheel + python -m pip install coverage pytest python -m pip install . - - name: Test with pytest + - name: Tests run: | - pytest + coverage run --branch -m pytest + coverage report --fail-under=100 diff --git a/README.md b/README.md index 289c623..8795057 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ $ venv/bin/python -m pytest . ```shell $ venv/bin/python -m pip install coverage -$ venv/bin/coverage run -m pytest . +$ venv/bin/coverage run --branch -m pytest . $ venv/bin/coverage html --omit='/private/*' $ open htmlcov/index.html ```