Fix sonar check

This commit is contained in:
Ming Deng 2021-01-09 21:36:30 +08:00
parent 31af4fbd03
commit 2590fbd5cb
3 changed files with 15 additions and 5 deletions

View File

@ -1,9 +1,15 @@
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]
name: Main Workflow
name: Sonar Check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
jobs:
sonarcloud:
runs-on: ubuntu-latest
@ -14,6 +20,3 @@ jobs:
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@ -1,4 +1,5 @@
# developing
- Add sonar check. [4432](https://github.com/beego/beego/pull/4432)
- Update changlog.yml to check every PR to develop branch.[4427](https://github.com/beego/beego/pull/4427)
- Fix 4396: Add context.param module into adapter. [4398](https://github.com/beego/beego/pull/4398)
- Remove `duration` from prometheus labels. [4391](https://github.com/beego/beego/pull/4391)

6
sonar-project.properties Normal file
View File

@ -0,0 +1,6 @@
sonar.organization=beego
sonar.projectKey=beego_beego
# relative paths to source directories. More details and properties are described
# in https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/
sonar.sources=.