Skip to content

Commit

Permalink
👷 Add SonarCloud Scan
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Oct 2, 2024
1 parent 1c6a06e commit db96578
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
- name: Test
run: go test -coverprofile=coverage.txt -covermode=atomic ./...

- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

build:
name: Build
runs-on: ubuntu-22.04
Expand All @@ -37,25 +43,3 @@ jobs:

- name: Build
run: go build

automerge:
name: Merge Automatically
needs: [test, build]
runs-on: ubuntu-22.04

permissions:
pull-requests: write
contents: write

steps:
- name: Obtain Access Token
id: acces_token
run: |
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.SYSTEMLI_APP_CREDENTIALS_TOKEN }})"
echo "::add-mask::$TOKEN"
echo "::set-output name=token::$TOKEN"
- name: Merge
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ steps.acces_token.outputs.token }}
11 changes: 11 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sonar.projectKey=systemli_userli-postfix-adapter
sonar.organization=systemli
sonar.links.homepage=https://github.com/systemli/userli-postfix-adapter
sonar.sourceEncoding=UTF-8

sonar.sources=.

sonar.tests=.
sonar.test.inclusions=**/*_test.go

sonar.go.coverage.reportPaths=coverage.out

0 comments on commit db96578

Please sign in to comment.