Skip to content

Commit

Permalink
chore: add dotnet sonar quality gate check (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-dematte-zupit authored Jul 18, 2024
1 parent c541ba5 commit 4795d81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/dotnet-workflow-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ on:
required: false
type: boolean
default: true
RUN_TESTS:
required: false
type: boolean
default: true

jobs:
dotnet-common:
Expand Down Expand Up @@ -68,6 +72,7 @@ jobs:

- name: Run tests
uses: zupit-it/pipeline-templates/.github/actions/dotnet/[email protected]
if: ${{ inputs.RUN_TESTS == 'true' }}
with:
WORKING_DIRECTORY: ${{ inputs.WORKING_DIRECTORY }}
GENERATE_CODE_COVERAGE: false
5 changes: 5 additions & 0 deletions .github/workflows/sonar-step-dotnet-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ on:
required: false
type: string
default: ""
CHECK_QUALITY_GATE:
required: false
type: boolean
default: false

jobs:
sonar-analyze:
Expand Down Expand Up @@ -86,6 +90,7 @@ jobs:
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" \
/d:sonar.cs.vstest.reportsPaths=**/*.trx \
/d:sonar.qualitygate.wait=${{ inputs.CHECK_QUALITY_GATE }} \
"${params[@]}"
- name: Build
Expand Down

0 comments on commit 4795d81

Please sign in to comment.