From 99788d7ef05d919a1128852e8d1c8d2584240ccb Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 4 Oct 2026 08:32:00 -0400 Subject: [PATCH] ci: add SonarQube Cloud CI-based analysis Automatic Analysis is not available for this project because SonarQube Cloud does not support .astro files (only ~17% of code is in supported languages, below the 20% eligibility threshold). Add a CI-based scan via sonarqube-scan-action that analyzes the TypeScript/CSS sources on push to main and on pull requests. --- .github/workflows/sonarqube.yml | 27 +++++++++++++++++++++++++++ sonar-project.properties | 7 +++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/sonarqube.yml create mode 100644 sonar-project.properties 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