Skip to content

Commit

Permalink
- (#589)
Browse files Browse the repository at this point in the history
* -

* -

* Debug error msg.

* -

* -
  • Loading branch information
as2024ad authored Dec 17, 2024
1 parent 2375d0d commit f641411
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
name: Static code analysis

# on:
# pull_request:
# branches:
# - main
# - next

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

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

- name: Build, Test and Analyze
env:
SONAR_TOKEN_AS: ${{ secrets.SONAR_TOKEN_AS }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_AS }}
run: |
dotnet-sonarscanner begin \
/k:"as2024ad_sfsw" \
/o:"as2024ad" \
/k:as2024ad_sfsw \
/o:as2024ad \
/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.project-key="${{ secrets.SONAR_PROJECT_KEY_AS }}" \
/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"
Expand Down

0 comments on commit f641411

Please sign in to comment.