From 6209272b46a2fdccb63d878479d4567e7bf59095 Mon Sep 17 00:00:00 2001 From: aswin-in-philips Date: Fri, 17 Feb 2023 12:46:11 +0530 Subject: [PATCH] test --- .github/workflows/ci.yaml | 44 ++++++++++++++++++++++++++++++++------- sonar-project.properties | 6 ++++++ 2 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 sonar-project.properties diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 53827e6d..232fc6cc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -88,15 +88,43 @@ jobs: # run: | # ./.github/workflows/test.sh - BlackduckScan: - #needs: [Init] - runs-on: builder_blr - steps: - - name: checkout - uses: actions/checkout@v2 + # BlackduckScan: + # #needs: [Init] + # runs-on: builder_blr + # steps: + # - name: checkout + # uses: actions/checkout@v2 - - name: blackduck scan - run: powershell -ExecutionPolicy RemoteSigned -NoExit -File ${{ github.workspace }}\Build\PS\Invoke-BlackduckDetect.ps1 -SourcePath ${{ github.workspace }} -ApiToken ${{ secrets.BLACKDUCK_TOKEN }} + # - name: blackduck scan + # run: powershell -ExecutionPolicy RemoteSigned -NoExit -File ${{ github.workspace }}\Build\PS\Invoke-BlackduckDetect.ps1 -SourcePath ${{ github.workspace }} -ApiToken ${{ secrets.BLACKDUCK_TOKEN }} + + CodeAnalysis: + runs-on: ubuntu-20.04 + #needs: [Init] + defaults: + run: + working-directory: ${{ github.workspace }} + steps: + - uses: actions/checkout@v2 + + - name: install Go + run: | + sudo apt update + sudo apt install golang + + - name: coverage-report + run: | + cd ${{ github.workspace }} + go test -cover + + # - name: SonarQube Scan + # uses: sonarsource/sonarqube-scan-action@master + # env: + # SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + # SONAR_HOST_URL: https://sonarqube.ta.philips.com/ + # with: + # projectBaseDir: ${{ github.workspace }} + # Fortify: diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000..98173487 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,6 @@ +sonar.projectKey=EDI-hds-oauth2-proxy +sonar.projectName=EDI-hds-oauth2-proxy +sonar.sources=. +sonar.exclusions=**/*_test.go +sonar.tests=. +sonar.test.inclusions=**/*_test.go \ No newline at end of file