From 0417582530cffca05b8366bea170124cc2f91bb7 Mon Sep 17 00:00:00 2001 From: Noah Hanford Date: Wed, 4 Mar 2026 09:27:09 -0500 Subject: [PATCH 1/2] Add Sonarqube workflow for code analysis --- .github/workflows/sonarqube.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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 0000000..02f62cf --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,30 @@ +name: Sonarqube + +on: + push: + branches: + - dev + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build: + name: Analyze + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: SonarSource/sonarqube-scan-action@v5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # If you wish to fail your job when the Quality Gate is red, uncomment the + # following lines. This would typically be used to fail a deployment. + # We do not recommend to use this in a pull request. Prefer using pull request + # decoration instead. + # - uses: SonarSource/sonarqube-quality-gate-action@v1 + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 453c9f1f159414dbac9a870eac68b86e51abec51 Mon Sep 17 00:00:00 2001 From: Noah Hanford Date: Wed, 4 Mar 2026 09:27:41 -0500 Subject: [PATCH 2/2] Add 'main' branch to SonarQube workflow triggers --- .github/workflows/sonarqube.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 02f62cf..9b5f7fa 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -3,6 +3,7 @@ name: Sonarqube on: push: branches: + - main - dev pull_request: types: [opened, synchronize, reopened]