From a45c96c495ecf783b1f90dd38f7c4eeb2f7ff9f4 Mon Sep 17 00:00:00 2001 From: Cunliang Geng Date: Wed, 12 Jun 2024 11:49:47 +0200 Subject: [PATCH] fix coverage config --- .github/workflows/sonar-cloud.yml | 2 +- sonar-project.properties | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonar-cloud.yml b/.github/workflows/sonar-cloud.yml index dc3b51e8..00e121b2 100644 --- a/.github/workflows/sonar-cloud.yml +++ b/.github/workflows/sonar-cloud.yml @@ -45,7 +45,7 @@ jobs: python3 -m pip install .[dev] install-nplinker-deps --run-on-github - name: Run unit tests with coverage - run: pytest --cov=nplinker --cov-report=xml tests/unit + run: pytest --cov=nplinker --cov-report=xml --cov-report=term tests/unit - name: SonarCloud Scan uses: SonarSource/sonarcloud-github-action@master env: diff --git a/sonar-project.properties b/sonar-project.properties index 9107e605..52012298 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,11 +2,15 @@ sonar.projectKey=NPLinker_nplinker sonar.organization=nplinker sonar.projectName=nplinker sonar.host.url=https://sonarcloud.io -sonar.sources=src/nplinker/ + +sonar.sources=src sonar.tests=tests/unit +sonar.language=py + sonar.links.homepage=https://github.com/NPLinker/nplinker sonar.links.scm=https://github.com/NPLinker/nplinker sonar.links.issue=https://github.com/NPLinker/nplinker/issues sonar.links.ci=https://github.com/NPLinker/nplinker/actions + sonar.python.coverage.reportPaths=coverage.xml sonar.python.version=3.10 \ No newline at end of file