feat!: update target frameworks to net8.0 and net10.0, drop net5.0 and net6.0 #1474
Workflow file for this run
This file contains hidden or 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: 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 | |
| env: | |
| solutionName: Microsoft.Kiota.slnx | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup .NET 8 and 10 | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.x | |
| 10.x | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: csharp | |
| - name: Restore dependencies | |
| run: dotnet restore ${{ env.solutionName }} | |
| - name: Check formatting | |
| run: dotnet format ${{ env.solutionName }} --verify-no-changes | |
| - name: Build | |
| run: dotnet build ${{ env.solutionName }} --no-restore | |
| /p:UseSharedCompilation=false | |
| - name: Test for net472 | |
| run: dotnet test --solution ${{ env.solutionName }} --no-build --verbosity | |
| normal --framework net472 | |
| - name: Test for net10.0 and collect coverage | |
| run: dotnet test --solution ${{ env.solutionName }} --no-build --verbosity | |
| normal --framework net10.0 -- --coverlet --coverlet-output-format | |
| opencover | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 |