mirror of
https://github.com/wneessen/go-hibp.git
synced 2024-11-23 05:10:50 +01:00
Update sonarqube.yml
Added API token for tests (via secrets) and excluded the example code
This commit is contained in:
parent
2467a860e1
commit
68f9edf0a4
1 changed files with 4 additions and 2 deletions
6
.github/workflows/sonarqube.yml
vendored
6
.github/workflows/sonarqube.yml
vendored
|
@ -3,6 +3,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main # or the name of your main branch
|
- main # or the name of your main branch
|
||||||
|
env:
|
||||||
|
HIBP_API_KEY: ${{ secrets.HIBP_API_KEY }}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
|
@ -19,12 +21,12 @@ jobs:
|
||||||
|
|
||||||
- name: Run unit Tests
|
- name: Run unit Tests
|
||||||
run: |
|
run: |
|
||||||
go test -v -race --coverprofile=./cov.out ./...
|
go test -v -race --coverprofile=./cov.out .
|
||||||
|
|
||||||
- name: Run Gosec Security Scanner
|
- name: Run Gosec Security Scanner
|
||||||
uses: securego/gosec@master
|
uses: securego/gosec@master
|
||||||
with:
|
with:
|
||||||
args: '-no-fail -fmt sonarqube -out report.json ./...'
|
args: '-no-fail -fmt sonarqube -out report.json .'
|
||||||
|
|
||||||
- uses: sonarsource/sonarqube-scan-action@master
|
- uses: sonarsource/sonarqube-scan-action@master
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in a new issue