Skip to content

Bump the serilog group with 2 updates #444

Bump the serilog group with 2 updates

Bump the serilog group with 2 updates #444

Workflow file for this run

name: sonar
on:
push:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "**/*.props"
- "global.json"
- ".github/workflows/sonar.yml"
pull_request:
branches:
- main
paths:
- "src/**"
- "tests/**"
- "global.json"
- ".github/workflows/sonar.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sonarcloud:
runs-on: windows-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: ./global.json
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: 17
distribution: "zulu"
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Install dotnet-coverage tool
run: |
dotnet tool install --global dotnet-coverage
- name: Build and analyze with coverage
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
# Start SonarCloud analysis
.\.sonar\scanner\dotnet-sonarscanner begin `
/k:"Tsingis_bitcoin-web-api" `
/o:"tsingis" `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" `
/d:sonar.host.url="https://sonarcloud.io" `
/d:sonar.cs.vscoveragexml.reportsPaths="coverage.xml" `
/d:sonar.scanner.scanAll=false `
/d:sonar.exclusions="global.json"
dotnet build --no-incremental
dotnet-coverage collect "dotnet test" -f xml -o "coverage.xml"
.\.sonar\scanner\dotnet-sonarscanner end `
/d:sonar.token="${{ secrets.SONAR_TOKEN }}"