From 0d13feb7df8e91c31dac72745f43a2698c55bd7b Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Wed, 19 Nov 2025 09:57:10 +0500 Subject: [PATCH 1/2] Add sonar-project.properties for SonarQube configuration --- 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..b9f3ede --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=AltaPay_sdk-python_307c8b3c-eb03-4e95-8a4f-3cb5510110a9 From 0b8b68dd80ddeaa59ce7e0de1a407315b068f454 Mon Sep 17 00:00:00 2001 From: Bushra Asif Date: Wed, 19 Nov 2025 09:58:31 +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 }}