From 4b79534d6009971523e33fc4917fb065df167497 Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Fri, 21 Nov 2025 09:37:31 +0500 Subject: [PATCH 1/2] Add sonar-project.properties for SonarQube analysis --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..14a8971 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=AltaPay_sdk-ruby_b470675d-c4dc-4e5a-82b2-f4295fbe59f5 From 650e190024654b3f36e885d7af655b3d5aa4ae23 Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Fri, 21 Nov 2025 09:38:41 +0500 Subject: [PATCH 2/2] Add SonarQube analysis workflow --- .github/workflows/sonarqube-analysis.yml | 31 ++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/sonarqube-analysis.yml diff --git a/.github/workflows/sonarqube-analysis.yml b/.github/workflows/sonarqube-analysis.yml new file mode 100644 index 0000000..324ba29 --- /dev/null +++ b/.github/workflows/sonarqube-analysis.yml @@ -0,0 +1,31 @@ +name: SonarQube Analysis + +on: + pull_request: + push: + branches: ["**"] + +jobs: + build: + name: Run SonarQube Analysis + runs-on: self-hosted + + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + + - name: SonarQube Quality Gate check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@v1.2.0 + with: + pollingTimeoutSec: 600 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}