From 636aea638b194dbb78cce8fa84e4ad8999fb94f7 Mon Sep 17 00:00:00 2001 From: Cliff Su Date: Sun, 5 Nov 2023 18:06:51 +0800 Subject: [PATCH] ci: modify the code coverage --- .github/workflows/ci.yaml | 5 ++++- pytest.ini | 1 + sonar-project.properties | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0ad877a..c97257f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,10 @@ jobs: run: | pip install -r requirements.txt - name: Pytest Unit Test - run: pytest + run: | + pytest + ls -al + pwd - name: Flake8 Lint Check run: flake8 - name: SonarCloud Scan diff --git a/pytest.ini b/pytest.ini index 66771b4..92bddcb 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] +pythonpath = TaiwanLottery addopts = --cov=TaiwanLottery tests/ --cov-report=term diff --git a/sonar-project.properties b/sonar-project.properties index 256186b..5ea9afc 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,4 +3,5 @@ sonar.organization=stu01509 sonar.projectName=TaiwanLotteryCrawler sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 +sonar.python.version=3 sonar.python.coverage.reportPaths=coverage.xml