From 7793caffa15ada611504e8943a345172f10eff54 Mon Sep 17 00:00:00 2001 From: aswin-in-philips <95461541+aswin-in-philips@users.noreply.github.com> Date: Sat, 18 Feb 2023 13:17:34 +0530 Subject: [PATCH] Update ci.yaml --- .github/workflows/ci.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 34048c8a..1770f28e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -107,6 +107,26 @@ jobs: - name: Fortify scan run: powershell -ExecutionPolicy RemoteSigned -NoExit -File ${{ github.workspace }}\build\ps\Invoke-FortifyScan.ps1 -PublishAuthToken ${{ secrets.FORTIFY_TOKEN }} + + CodeAnalysis: + runs-on: builder_blr + needs: [Init] + steps: + - uses: actions/checkout@v2 + + - name: Set up Go 1.16 + uses: actions/setup-go@v2 + with: + go-version: 1.16.x + id: go + + - name: coverage + run: | + go test -coverprofile=${{ github.workspace }}\coverage.out + + - name: sonar + run: | + D:\SonarQube\Sonar-Scanner\sonar-scanner-cli-4.4.0.2170-windows\sonar-scanner-4.4.0.2170-windows\bin\sonar-scanner.bat -D"sonar.projectKey=EDI-hds-oauth2-proxy" -D"sonar.sources=." -D"sonar.tests=." -D"sonar.go.coverage.reportPaths=${{ github.workspace }}\coverage.out" -D"sonar.host.url=https://sonarqube.ta.philips.com/" -D"sonar.login=${{ secrets.SONAR_TOKEN }}" Build: