From 5ffc84a56416f8db0e99e2500602a5cc7e1a08dc 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 | 28 ++++++++++++++++++++++++++++ frontend/sonar-project.properties | 6 +++--- service/sonar-project.properties | 2 +- 3 files changed, 32 insertions(+), 4 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..282bf331 --- /dev/null +++ b/.github/workflows/service-scan.yaml @@ -0,0 +1,28 @@ +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 + args: > + -Dsonar.organization=adrianrudnik + -Dsonar.projectKey=ableton.service \ No newline at end of file diff --git a/frontend/sonar-project.properties b/frontend/sonar-project.properties index 08ca0807..b61517fe 100644 --- a/frontend/sonar-project.properties +++ b/frontend/sonar-project.properties @@ -1,3 +1,3 @@ -sonar.projectKey = ablegram:frontend -sonar.sourceEncoding = UTF-8 -sonar.exclusions = .run/**, .vscode/**, .idea/**, cypress/** +sonar.sourceEncoding = UTF-8 +sonar.exclusions = .run/**, .vscode/**, .idea/**, cypress/** +sonar.verbose = true diff --git a/service/sonar-project.properties b/service/sonar-project.properties index 9ffb52f3..848ffefd 100644 --- a/service/sonar-project.properties +++ b/service/sonar-project.properties @@ -1,3 +1,3 @@ -sonar.projectKey = ablegram:service sonar.sourceEncoding = UTF-8 sonar.exclusions = .http/**, .vscode/**, .idea/**, .samples/**, vendor/** +sonar.verbose = true