From 6b6662420f443179ccec0c3852e51ddc2c0333a0 Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Mon, 31 Jan 2022 20:53:57 +0200 Subject: [PATCH] adds instructions to get coverage (#299) Co-authored-by: Markos Gogoulos --- .coveragerc | 4 ++++ .github/workflows/python.yml | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..1a446ae --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = + *bento4* + */migrations/* diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index eda8bc4..5b106fc 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -29,7 +29,10 @@ jobs: shell: bash - name: Run Django Tests - run: docker-compose -f docker-compose-dev.yaml exec --env TESTING=True -T web pytest + run: docker-compose -f docker-compose-dev.yaml exec --env TESTING=True -T web pytest + + # Run with coverage, saves report on htmlcov dir + # run: docker-compose -f docker-compose-dev.yaml exec --env TESTING=True -T web pytest --cov --cov-report=html --cov-config=.coveragerc - name: Tear down the Stack run: docker-compose -f docker-compose-dev.yaml down