Skip to content

Commit

Permalink
SonarCloud triggers.
Browse files Browse the repository at this point in the history
* initial

* Revert to dfe token

* -

* /d:sonar.scanner.skipJreProvisioning=true

* revert

* trigger

* -

* Typo.
  • Loading branch information
as2024ad authored Dec 16, 2024
1 parent 6b989cb commit cd99678
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Static code analysis

on:
workflow_dispatch:
# push:
# branches: ["main", "release/**", "feature/**", "fix/**"]
pull_request:
types: [opened, synchronize, reopened]
# branches: ["next", "main", "release/**", "feature/**", "fix/**"]
branches: ["next", "main", "release/**", "feature/**", "fix/**"]

jobs:
code-analysis:
Expand Down Expand Up @@ -54,17 +56,17 @@ jobs:

- name: Build, Test and Analyze
env:
SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN_AS }}
SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN }}
run: |
dotnet-sonarscanner begin \
/k:"as2024ad_sfsw" \
/o:"as2024ad" \
/k:"DFE-Digital_childrens-social-care-cpd" \
/o:"dfe-digital" \
/d:sonar.qualitygate.wait=true \
/d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml \
/d:sonar.exclusions="**/*.css,**/*.scss,**/Models/*,**/Program.cs,**/WebApplicationBuilderExtensions.cs,**/GraphQL/Queries/*,**/Contentful-Schema/migrations/*.cjs" \
/d:sonar.test.exclusions="Childrens-Social-Care-CPD-Tests/**/*,Terraform-bootstrap/Error-pages/*" \
/d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}" \
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \
/d:sonar.host.url="https://sonarcloud.io"
dotnet build --no-incremental
dotnet-coverage collect --settings dotnet-cover-config.xml -f xml -o coverage.xml "dotnet test"
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN_AS }}"
dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

0 comments on commit cd99678

Please sign in to comment.