Update dependency Microsoft.Kiota.Serialization.Form to 1.16.1 - autoclosed #2205
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: SonarCloud | |
on: | |
workflow_dispatch: | |
push: | |
paths-ignore: | |
- '**/*' | |
- '!.github/workflows/sonar-cloud.yml' | |
- '!src/build.cake' | |
- '!src/**/*.cs' | |
branches: | |
- '*' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
name: Build | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'zulu' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 14 | |
- 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: .\src\.sonar\scanner | |
key: ${{ runner.os }}-sonar-scanner | |
restore-keys: ${{ runner.os }}-sonar-scanner | |
- name: Install SonarCloud scanner | |
shell: powershell | |
run: dotnet tool update dotnet-sonarscanner --tool-path .\src\.sonar\scanner | |
- name: Prepare | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
shell: powershell | |
working-directory: src | |
run: | | |
.\.sonar\scanner\dotnet-sonarscanner begin ` | |
/k:"christianhelle_apiclientcodegen" ` | |
/o:"christianhelle-github" ` | |
/d:sonar.login="${{ secrets.SONAR_TOKEN }}" ` | |
/d:sonar.host.url="https://sonarcloud.io" ` | |
/d:sonar.cs.vstest.reportsPaths=**/*.trx ` | |
/d:sonar.cs.vscoveragexml.reportsPaths=**/*.coveragexml | |
- name: Restore | |
run: dotnet restore VSIX.sln | |
working-directory: src | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build | |
run: msbuild VSIX.sln /property:Configuration=Release /t:Rebuild | |
working-directory: src | |
- name: Run .NET Core Tests | |
working-directory: src | |
continue-on-error: true | |
run: | | |
dotnet test CLI/ApiClientCodeGen.CLI.Tests\ApiClientCodeGen.CLI.Tests.csproj --collect "Code coverage" | |
dotnet test Core/ApiClientCodeGen.Core.Tests\ApiClientCodeGen.Core.Tests.csproj --collect "Code coverage" | |
dotnet test Core/ApiClientCodeGen.Core.IntegrationTests\ApiClientCodeGen.Core.IntegrationTests.csproj --collect "Code coverage" | |
- name: Convert Code Coverage | |
working-directory: src | |
continue-on-error: true | |
run: | | |
dotnet tool update dotnet-coverageconverter --tool-path .tools\coverage | |
.\.tools\coverage\dotnet-coverageconverter.exe --CoverageFilesFolder . --ProcessAllFiles | |
- name: Analyze | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
shell: powershell | |
working-directory: src | |
run: | | |
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" |