Update sonar-project.properties #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarQube scan | |
# place this file in <root folder>/.github/workflows | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- 'release/**' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
sonarqube: | |
runs-on: ubuntu-latest-4-cores | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Generate coverage.out and covreport.xml file | |
run: go test -v -coverprofile="coverage.out" ./... | |
- name: Copy file | |
run: cp coverage.out test/unittest/coverage.out | |
- name: cat the file | |
run: cat test/unittest/coverage.out | |
- name: SonarQube Scan | |
uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |