From 52bf3cca36b54a71dad9fe9dbfa539c7c8610153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ru=C3=A1n?= Date: Sun, 11 Aug 2024 20:57:47 +0100 Subject: [PATCH] [CHORE] Added SonarQube --- .github/workflows/sonarqube.yml | 27 +++++++++++++++++++++++++++ sonar-project.properties | 1 + 2 files changed, 28 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..0914485 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,27 @@ +name: SonarQube + +on: + push: + branches: + - master + + +jobs: + build: + name: Build and 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@master + 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. + # - uses: sonarsource/sonarqube-quality-gate-action@master + # timeout-minutes: 5 + # 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..fa89e1a --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=cs-soc-tudublin_clerk_ce28d75d-2870-4f52-a20d-d7816a4a1ba8 \ No newline at end of file