From 9725c985f53e67a0278af0f9abee20d566478972 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Aug 2022 21:57:09 +0100 Subject: [PATCH] Switch to SonarCloud (#25) --- .github/workflows/test.yml | 20 +++++++++++++------- renovate.json | 17 ++++++++++++++--- sonar-project.properties | 6 +++++- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aec8a92..163c08a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,6 +1,7 @@ name: Test on: pull_request: + types: [opened, synchronize, reopened] push: branches: [ main ] permissions: @@ -26,11 +27,16 @@ jobs: - name: Test run: go test -short -coverprofile=coverage.out continue-on-error: true - - uses: sonarsource/sonarqube-scan-action@master + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - uses: sonarsource/sonarqube-quality-gate-action@master - timeout-minutes: 5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CLOUD }} + # - uses: sonarsource/sonarqube-scan-action@master + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + # - uses: sonarsource/sonarqube-quality-gate-action@master + # timeout-minutes: 5 + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/renovate.json b/renovate.json index f45d8f1..ab32ea2 100644 --- a/renovate.json +++ b/renovate.json @@ -1,5 +1,16 @@ { - "extends": [ - "config:base" - ] + "extends": ["config:base"], + "platformCommit": true, + "dependencyDashboardAutoclose": true, + "assignAutomerge": true, + "assigneesFromCodeOwners": true, + "rebaseWhen": "behind-base-branch", + "rollbackPrs": true, + "labels": ["dependencies"], + "vulnerabilityAlerts": { + "enabled": true, + "labels": ["security"], + "commitMessagePrefix": "[SECURITY] ", + "prCreation": "immediate" + } } diff --git a/sonar-project.properties b/sonar-project.properties index 1fa4f73..f4ac572 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,4 +1,8 @@ -sonar.projectKey=luketainton_iPilot_AYKYmHI397IDIMpeRtF7 +sonar.organization=luketainton +sonar.projectKey=luketainton_iPilot +# sonar.projectKey=luketainton_iPilot_AYKYmHI397IDIMpeRtF7 +sonar.projectName=iPilot +sonar.projectVersion=1.3.9 sonar.sources=. sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,**/*_test.go sonar.tests=.