From d763b572da800d79aec7215a8634781c9bad6f9e Mon Sep 17 00:00:00 2001 From: Evgeniy Blinov Date: Mon, 22 Jul 2024 16:04:13 +0300 Subject: [PATCH] branch coverage calculation + coverage gate 100% --- .github/workflows/tests_and_coverage.yml | 4 ++-- .github/workflows/tests_and_coverage_old.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests_and_coverage.yml b/.github/workflows/tests_and_coverage.yml index c2fc757..80bba1f 100644 --- a/.github/workflows/tests_and_coverage.yml +++ b/.github/workflows/tests_and_coverage.yml @@ -32,7 +32,7 @@ jobs: run: pip list - name: Run tests and show coverage on the command line - run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m + run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=100 - name: Upload reports to codecov env: @@ -45,4 +45,4 @@ jobs: ./codecov -t ${CODECOV_TOKEN} - name: Run tests and show the branch coverage on the command line - run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m + run: coverage run --branch --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=100 diff --git a/.github/workflows/tests_and_coverage_old.yml b/.github/workflows/tests_and_coverage_old.yml index 9cf8ea5..ab55934 100644 --- a/.github/workflows/tests_and_coverage_old.yml +++ b/.github/workflows/tests_and_coverage_old.yml @@ -32,7 +32,7 @@ jobs: run: pip list - name: Run tests and show coverage on the command line - run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m + run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=100 - name: Upload reports to codecov env: @@ -45,4 +45,4 @@ jobs: ./codecov -t ${CODECOV_TOKEN} - name: Run tests and show the branch coverage on the command line - run: coverage run --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m + run: coverage run --branch --source=metronomes --omit="*tests*" -m pytest --cache-clear --assert=plain && coverage report -m --fail-under=100