diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 0c8dad3..53f8160 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -28,10 +28,8 @@ jobs: python -m pip install -e .[dev] - name: Run unit tests and store coverage run: | - # [!] Note that sonarcloud runs the full test suite - coverage run -m pytest -n auto - coverage report -m - coverage xml -o coverage.xml + # [!] Note that sonarcloud runs the fast test suite + pytest --fast -n auto --cov=src --cov-report=xml:coverage.xml --cov-report=term-missing - name: Make coverage paths relative run: sed -i "s+$PWD/++g" coverage.xml - name: SonarQube Scan diff --git a/sonar-project.properties b/sonar-project.properties index 9cde9ba..d3886e1 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -8,4 +8,3 @@ sonar.links.scm=git@github.com:WUR-AI/diffwofost sonar.links.issue=https://github.com/WUR-AI/diffwofost/issues sonar.links.ci=https://github.com/WUR-AI/diffwofost/actions sonar.python.coverage.reportPaths=coverage.xml -sonar.coverage.exclusions=src/diffwofost/physical_models/crop/evapotranspiration.py,src/diffwofost/physical_models/utils.py