From 6cbf0603306fd95d8bcb8608040ab3f805e21cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=B4=D8=B1=D9=83=D8=A9=20=D8=AE=D8=A8=D9=8A=D8=B1=20?= =?UTF-8?q?=D8=A7=D9=84=D9=85=D8=AD=D8=AF=D9=88=D8=AF=D8=A9?= Date: Sun, 17 Aug 2025 19:03:56 +0300 Subject: [PATCH] Create sonarqube.yml --- .github/workflows/sonarqube.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/sonarqube.yml diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 000000000..59a490c2d --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,34 @@ +name: SonarQube Analysis + +on: + push: + branches: [ "dev_odex25_hr" ] + pull_request: + branches: [ "dev_odex25_hr" ] + +jobs: + sonar: + runs-on: sonarqube + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install dependencies + run: | + pip install -r requirements.txt || true + pip install pylint-odoo || true + + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v2 + with: + args: > + -Dsonar.projectKey=odex25_standard_modules_dev_odex25_hr + -Dsonar.sources=odex25_hr + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: "https://sonar.odex.sa"