From 7af81c837054debde4a7acb30e3ba6a91caeeea7 Mon Sep 17 00:00:00 2001 From: Eduard0803 Date: Sat, 2 Dec 2023 13:26:44 -0300 Subject: [PATCH] feat: workflow to create coverage.xml file --- .github/workflows/tests.yml | 2 ++ sonar-project.properties | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 98b78c7..0362b6d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,3 +48,5 @@ jobs: env: HOST: "0.0.0.0" DB_HOST: localhost + - name: Generate Sonar-metrics + run: poetry run coverage xml -o coverage.xml diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..e8f49e2 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,16 @@ +sonar.projectKey=fga-eps-mds_2023.2-SINDPOL-Gestao +sonar.organization=fga-eps-mds-1 + +sonar.language=python + +sonar.sources=. +sonar.tests=./gestao/tests +sonar.python.version=3 +sonar.dynamicAnalysis=reuseReports +sonar.sources.exclusions= \ + **/__init__.py \ + **/__pycache__/ \ + /gestao\db\migrations\versions/ \ + src/staticfiles/** + +sonar.python.coverage.reportPaths=coverage.xml