From 85db234f5eaa66806d70c94e375bb64aad09d7dd Mon Sep 17 00:00:00 2001 From: Anton SHEPILOV Date: Thu, 20 Jun 2024 15:52:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7Added=20sonarqube=20analysis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sonarqube.yml | 30 ++++++++++++++++++++++++++++++ sonar-project.properties | 1 + 2 files changed, 31 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 000000000..e3ae40d56 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,30 @@ +name: Build + +on: + push: + branches: + - main + - sonar + pull_request: + branches: + - sonar + +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 000000000..e02932de4 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1 @@ +sonar.projectKey=Twake-Drive \ No newline at end of file