From a316e17bda83f1aa9569f4ed77291ee72843d0c0 Mon Sep 17 00:00:00 2001 From: scastineyras <162158563+scastineyras@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:20:18 -0300 Subject: [PATCH] OD-2677: added sonarqube scans OD-2677: added sonarqube scans --- .github/workflows/test.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ec73d6..3292074 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,4 +66,17 @@ jobs: ckan -c test.ini db init ckan -c test.ini db upgrade -p googleanalytics - name: Run tests - run: pytest --ckan-ini=test.ini --cov=ckanext.googleanalytics --disable-warnings ckanext/googleanalytics/tests + run: pytest --ckan-ini=test.ini --cov=ckanext.googleanalytics --cov-report xml:coverage.xml --disable-warnings ckanext/googleanalytics/tests + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + with: + args: > + -Dsonar.projectKey=ckanext-googleanalytics + -Dsonar.sources=ckanext/googleanalytics + -Dsonar.tests=ckanext/googleanalytics/tests + -Dsonar.exclusions=ckanext/googleanalytics/tests/** + -Dsonar.python.coverage.reportPaths=coverage.xml + env: + SONAR_TOKEN: ${{ secrets.SONAR_API_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_EXTERNAL_URL }} +