From 4bed9fc0a3920a6feda6a80b5707311e7f5a6678 Mon Sep 17 00:00:00 2001 From: Thomas Bereczky Date: Mon, 28 Aug 2023 11:27:41 +0200 Subject: [PATCH] Sonarqube checks --- .github/workflows/sonarqube.yml | 26 ++++++++++++++++++++++++++ sonar-project.properties | 5 +++++ 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 00000000..8b10a65e --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,26 @@ +name: SonarQube Checks + +on: + # Trigger analysis when pushing to your main branches, and when creating a pull request. + push: + branches: + - main + - master + - develop + - 'releases/**' + pull_request: + types: [opened, synchronize, reopened] + +jobs: + sonarqube: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..20d6b54f --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,5 @@ +sonar.projectKey=Emurgo_cardano-serialization-lib_AYo7dL-2R7D0rS4j9fWq + +# relative paths to source directories. More details and properties are described +# in https://docs.sonarqube.org/latest/project-administration/narrowing-the-focus/ +sonar.sources=.