Skip to content

Merge pull request #117 from microsoft/dependabot/nuget/System.Format… #174

Merge pull request #117 from microsoft/dependabot/nuget/System.Format…

Merge pull request #117 from microsoft/dependabot/nuget/System.Format… #174

name: Build and Test
on:
workflow_dispatch:
push:
branches: [ 'main', 'dev', 'feature/*' ]
pull_request:
branches: [ 'main', 'dev' ]
permissions:
contents: read #those permissions are required to run the codeql analysis
actions: read
security-events: write
jobs:
build-and-test:
runs-on: windows-latest # Temporary switch to windows till https://github.com/microsoft/vstest/issues/4549 is released in dotnet version after 7.0.400
env:
solutionName: Microsoft.Kiota.Serialization.Cbor.sln
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: csharp
- name: Restore dependencies
run: dotnet restore ${{ env.solutionName }}
- name: Build
run: dotnet build ${{ env.solutionName }} --no-restore -c Release /p:UseSharedCompilation=false
- name: Test
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Release /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3