From 68f9edf0a409c558d8cf66f0ae99812be4d73342 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Sat, 7 May 2022 14:35:35 +0200 Subject: [PATCH] Update sonarqube.yml Added API token for tests (via secrets) and excluded the example code --- .github/workflows/sonarqube.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index 58e80a8..63e15d3 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -3,6 +3,8 @@ on: push: branches: - main # or the name of your main branch +env: + HIBP_API_KEY: ${{ secrets.HIBP_API_KEY }} jobs: build: name: Build @@ -19,12 +21,12 @@ jobs: - name: Run unit Tests run: | - go test -v -race --coverprofile=./cov.out ./... + go test -v -race --coverprofile=./cov.out . - name: Run Gosec Security Scanner uses: securego/gosec@master with: - args: '-no-fail -fmt sonarqube -out report.json ./...' + args: '-no-fail -fmt sonarqube -out report.json .' - uses: sonarsource/sonarqube-scan-action@master env: