From 7969de50bfadfd07be93bca0cf79d458fa72462f Mon Sep 17 00:00:00 2001 From: TheNetworkGuy Date: Thu, 12 Jun 2025 20:24:29 +0000 Subject: [PATCH] Adds coverage report to gitignore. Adds extra coverage test to workflow. --- .github/workflows/run_tests.yml | 9 +++++++++ .gitignore | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 9093c96..604518d 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -19,7 +19,16 @@ jobs: python -m pip install --upgrade pip pip install pytest pytest-mock pip install -r requirements.txt + - name: Install coverage + run: pip install coverage pytest-cov - name: Testing the code with PyTest run: | cp config.py.example config.py pytest tests + - name: Run tests with coverage + run: | + cp config.py.example config.py + coverage run -m pytest tests + - name: Check coverage percentage + run: | + coverage report --fail-under=70 diff --git a/.gitignore b/.gitignore index 0693f26..c515fe3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ Pipfile.lock __pycache__/ *.py[cod] .vscode -.flake \ No newline at end of file +.flake +.coverage \ No newline at end of file