From 02167c205b99c2e479b18ea4fd51d8ebb0dcf1ff Mon Sep 17 00:00:00 2001 From: vrybas Date: Tue, 23 Jul 2024 13:29:13 +0200 Subject: [PATCH] [TU-13732] Add SonarCloud confuguration --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ sonar-project.properties | 10 ++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 sonar-project.properties diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1b93792 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + pull_request: + branches: + - main + +jobs: + sonarcloud: + name: Test and Code Quality Report (SonarCloud) + runs-on: ubuntu-latest + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..1e7f996 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,10 @@ +sonar.projectKey=Typeform_results-example +sonar.organization=typeform + +sonar.sources=src +sonar.tests=tests + +sonar.inclusions=packages/*/src/**/*.ts,src/**/*.js +sonar.exclusions=node_modules/**,dist/**,**/*.spec.ts,**/*.test.ts + +sonar.test.exclusions=node_modules/**,dist/** \ No newline at end of file