diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 0000000..3ccfe75 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,27 @@ +name: SonarQube Cloud + +on: + push: + branches: + - main + pull_request: + +permissions: + contents: read + +jobs: + sonarqube: + name: SonarQube Cloud + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Disabling shallow clones is recommended for improving the relevancy of reporting + fetch-depth: 0 + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@d209202bc7d53ff1cc128f7f907dac145c9d6ae9 # v8.3.0 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..2a444d3 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,7 @@ +sonar.organization=setchy +sonar.projectKey=setchy_meme-driven.dev + +# relative paths to source directories. More details and properties are described +# at https://docs.sonarsource.com/sonarqube-cloud/advanced-setup/analysis-scope/ +sonar.sources=src +sonar.sourceEncoding=UTF-8 \ No newline at end of file