From cb5f24a261e8613b4984dc7c1b2127879086a657 Mon Sep 17 00:00:00 2001 From: martinjrobins Date: Thu, 11 Jan 2024 20:26:21 +0000 Subject: [PATCH] add frontend to sonarqube --- .github/workflows/coverage-test.yml | 9 ++++++++- frontend-v2/sonar-project.properties | 17 +++++++++++++++++ pkpdapp/sonar-project.properties | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 frontend-v2/sonar-project.properties diff --git a/.github/workflows/coverage-test.yml b/.github/workflows/coverage-test.yml index 366af0c7..0adad157 100644 --- a/.github/workflows/coverage-test.yml +++ b/.github/workflows/coverage-test.yml @@ -43,10 +43,17 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: | cd pkpdapp && codecov - - name: SonarCloud Scan + - name: SonarCloud Scan Backend uses: SonarSource/sonarcloud-github-action@master env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + projectBaseDir: pkpdapp + - name: SonarCloud Scan Frontend + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_FRONTEND }} with: projectBaseDir: pkpdapp \ No newline at end of file diff --git a/frontend-v2/sonar-project.properties b/frontend-v2/sonar-project.properties new file mode 100644 index 00000000..c04d9ed7 --- /dev/null +++ b/frontend-v2/sonar-project.properties @@ -0,0 +1,17 @@ +sonar.projectKey=pkpdapp-team_pkpdapp_frontend +sonar.organization=pkpdapp-team +sonar.sources=src/ +sonar.tests.exclusions=cypress/** +sonar.tests=cypress/ + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=pkpdapp +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file diff --git a/pkpdapp/sonar-project.properties b/pkpdapp/sonar-project.properties index 3904ff57..78505e6f 100644 --- a/pkpdapp/sonar-project.properties +++ b/pkpdapp/sonar-project.properties @@ -1,6 +1,6 @@ sonar.projectKey=pkpdapp-team_pkpdapp sonar.organization=pkpdapp-team -sonar.python.coverage.reportPaths=pkpdapp/coverage.xml +sonar.python.coverage.reportPaths=coverage.xml sonar.sources=pkpdapp/ sonar.tests.exclusions=pkpdapp/tests/** sonar.tests=pkpdapp/tests/