From a99850c6ed335af39d1d60b665ca4a900e4ae1da Mon Sep 17 00:00:00 2001 From: Tom Howlett Date: Sat, 6 Apr 2024 17:49:48 +0100 Subject: [PATCH] added coverage --- .coveragerc | 4 ++++ .github/workflows/python-app.yml | 2 +- .gitignore | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..228e3af --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +source = pokedex +branch = True +relative_files = True diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 60b2d18..439bdf5 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -38,7 +38,7 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest run: | - pytest + pytest --cov --cov-report xml:cov.xml --cov-config=.coveragerc - name: SQ Analyse uses: sonarsource/sonarqube-scan-action@master env: diff --git a/.gitignore b/.gitignore index 2ed58d6..eb2fffe 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ __pycache__ .python-version .scannerwork .idea +.vscode/ +.venv/ +