From 84472f6ae69e2989af067f6c375a09e24975b8e6 Mon Sep 17 00:00:00 2001 From: Adrian Rudnik Date: Sat, 28 Oct 2023 13:05:01 +0200 Subject: [PATCH] Sonar test config --- .github/workflows/service-scan.yaml | 25 +++++++++++++++++++++++++ frontend/sonar-project.properties | 2 +- service/sonar-project.properties | 3 ++- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/service-scan.yaml diff --git a/.github/workflows/service-scan.yaml b/.github/workflows/service-scan.yaml new file mode 100644 index 00000000..15142d2a --- /dev/null +++ b/.github/workflows/service-scan.yaml @@ -0,0 +1,25 @@ +name: Prey on service code +on: + push: + branches: + - main + paths: + - service/** + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SERVICE }} + with: + projectBaseDir: service diff --git a/frontend/sonar-project.properties b/frontend/sonar-project.properties index 08ca0807..d9a89250 100644 --- a/frontend/sonar-project.properties +++ b/frontend/sonar-project.properties @@ -1,3 +1,3 @@ -sonar.projectKey = ablegram:frontend +sonar.projectKey = ablegram.frontend sonar.sourceEncoding = UTF-8 sonar.exclusions = .run/**, .vscode/**, .idea/**, cypress/** diff --git a/service/sonar-project.properties b/service/sonar-project.properties index 9ffb52f3..edea5348 100644 --- a/service/sonar-project.properties +++ b/service/sonar-project.properties @@ -1,3 +1,4 @@ -sonar.projectKey = ablegram:service +sonar.projectKey = ablegram.service sonar.sourceEncoding = UTF-8 sonar.exclusions = .http/**, .vscode/**, .idea/**, .samples/**, vendor/** +sonar.verbose = true