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..26b3845 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,7 @@ +sonar.projectKey=Typeform_embed-demo +sonar.organization=typeform + +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