chore: adding sonar properties
parent
47de59ef1b
commit
a40d8d836a
|
@ -14,6 +14,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "~1.17"
|
||||
|
@ -21,6 +23,10 @@ jobs:
|
|||
- uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: coverage.out
|
||||
- uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -33,3 +39,22 @@ jobs:
|
|||
with:
|
||||
go-version: "~1.17"
|
||||
- run: go build ./cmd/changeloguru
|
||||
golangci-lint:
|
||||
name: golangci-lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: latest
|
||||
semgrep:
|
||||
name: semgrep
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: returntocorp/semgrep-action@v1
|
||||
with:
|
||||
config: >-
|
||||
p/security-audit
|
||||
p/secrets
|
||||
p/golang
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
name: golangci-lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: golangci-lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
version: latest
|
|
@ -1,22 +0,0 @@
|
|||
name: semgrep
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: semgrep
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: returntocorp/semgrep-action@v1
|
||||
with:
|
||||
config: >-
|
||||
p/security-audit
|
||||
p/secrets
|
||||
p/golang
|
|
@ -0,0 +1,10 @@
|
|||
sonar.projectKey=haunt98_changeloguru
|
||||
sonar.projectName=changeloguru
|
||||
|
||||
sonar.sources=.
|
||||
sonar.exclusions=**/*_test.go
|
||||
|
||||
sonar.tests=.
|
||||
sonar.test.inclusions=**/*_test.go
|
||||
|
||||
sonar.go.coverage.reportPaths=coverage.out
|
Loading…
Reference in New Issue