Skip to content

Commit

Permalink
move cov to setup python
Browse files Browse the repository at this point in the history
  • Loading branch information
ikethecoder committed May 8, 2024
1 parent 07295c8 commit 51ccfb3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install deps
run: |
sudo apt update
sudo apt install -y pipx git
pipx ensurepath
pipx install poetry
- name: Test coverage for Kube API
run: |
export PATH=/root/.local/bin:$PATH
cd microservices/kubeApi
poetry install --no-root
Expand Down
3 changes: 0 additions & 3 deletions microservices/kubeApi/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ httpx = "^0.20.0"
pytest-cov = "^5.0.0"
pytest-mock = "^3.14.0"

[tool.coverage.run]
relative_files = true

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
21 changes: 10 additions & 11 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
sonar.organization=bcgov-oss
sonar.projectKey=gwa-api

#sonar.sources=src
sonar.python.coverage.reportPaths=microservices/*/coverage.xml

# relative paths to source directories. More details and properties are described
# in https://docs.sonarsource.com/sonarcloud/advanced-setup/analysis-scope/
# sonar.sources=microservices/gatewayApi/auth, \
# microservices/gatewayApi/clients, \
# microservices/gatewayApi/tests, \
# microservices/gatewayApi/v1, \
# microservices/gatewayApi/v2, \
# microservices/gatewayJobScheduler, \
# microservices/kubeApi/ \
sonar.sources=microservices/gatewayApi/auth, \
microservices/gatewayApi/clients, \
microservices/gatewayApi/tests, \
microservices/gatewayApi/v1, \
microservices/gatewayApi/v2, \
microservices/gatewayJobScheduler, \
microservices/kubeApi/ \
# sonar.sources=microservices/kubeApi/ \
kubeApi.sonar.projectBaseDir=microservices
kubeApi.sonar.sources=kubeApi/auth,kubeApi/clients,kubeApi/routers
kubeApi.sonar.python.coverage.reportPaths=kubeApi/coverage.xml
# kubeApi.sonar.projectBaseDir=microservices
# kubeApi.sonar.sources=kubeApi/auth,kubeApi/clients,kubeApi/routers
# kubeApi.sonar.python.coverage.reportPaths=kubeApi/coverage.xml

#sonar.python.coverage.reportPaths=microservices/*/coverage.xml

0 comments on commit 51ccfb3

Please sign in to comment.