From d86853f7dda95f5d0b4e98f8db89bfbf4114ef9e Mon Sep 17 00:00:00 2001 From: Sebastian Englbrecht Date: Tue, 20 Dec 2022 21:27:06 +0100 Subject: [PATCH] Omit test dir for coverage --- .github/workflows/pull_request.yml | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 78c06965c..108c8ac07 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -101,7 +101,7 @@ jobs: run: docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate - name: Run tests and measure codecoverage # Make sure to also update the Makefile target! - run: docker run --rm --entrypoint=/bin/bash frigate:latest -c "python3 -u -m coverage run -m unittest;python3 -m coverage report --include=frigate/*" + run: docker run --rm --entrypoint=/bin/bash frigate:latest -c "python3 -u -m coverage run -m unittest;python3 -m coverage report --include=frigate/* --omit=frigate/test/*"" - name: Upload codecoverage report to Codecov uses: codecov/codecov-action@v3.1.1 diff --git a/Makefile b/Makefile index 55c491cc7..7891aee8d 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ run: local run_tests: local # Make sure to also check and update the Github Action in pull_request.yml - docker run --rm --workdir=/opt/frigate --entrypoint=/bin/bash frigate:latest -c "python3 -u -m coverage run -m unittest;python3 -m coverage report --include=frigate/*" + docker run --rm --workdir=/opt/frigate --entrypoint=/bin/bash frigate:latest -c "python3 -u -m coverage run -m unittest;python3 -m coverage report --include=frigate/* --omit=frigate/test/*" docker run --rm --workdir=/opt/frigate --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate .PHONY: run_tests