Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
486 changes: 247 additions & 239 deletions .azure-pipelines/ci-build.yml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Copilot Instructions

## Upgrade Guide

When working on code that consumes the Kiota .NET libraries, or when encountering build errors after a version update, refer to [`docs/upgrade-guide-v1-to-v2.md`](../docs/upgrade-guide-v1-to-v2.md) for breaking changes, migration steps, and compiler error mappings between v1.x and v2.x.

## Commit Message Format

Always use conventional commits format when creating commits. Follow this structure:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Build and Test
on:
workflow_dispatch:
push:
branches: ["main", "dev", "feature/*"]
branches: [ "main", "dev", "feature/*" ]
pull_request:
branches: ["main", "dev"]
branches: [ "main", "dev" ]

permissions:
contents: read #those permissions are required to run the codeql analysis
Expand All @@ -19,10 +19,13 @@ jobs:
solutionName: Microsoft.Kiota.slnx
steps:
- uses: actions/checkout@v6
- name: Setup .NET

- name: Setup .NET 8 and 10
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
dotnet-version: |
8.x
10.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
Expand All @@ -32,10 +35,14 @@ jobs:
- name: Check formatting
run: dotnet format ${{ env.solutionName }} --verify-no-changes
- name: Build
run: dotnet build ${{ env.solutionName }} --no-restore /p:UseSharedCompilation=false
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
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
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
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: pwsh
run: |
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="$env:SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/abstractions/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/authentication/azure/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/http/httpClient/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/json/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/text/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/form/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/serialization/multipart/bin/Debug/net10.0/TestResults/coverage.opencover.xml,tests/bundle/bin/Debug/net10.0/TestResults/coverage.opencover.xml"
dotnet tool run dotnet-sonarscanner begin /k:"microsoft_kiota-abstractions-dotnet" /o:"microsoft" /d:sonar.token="$env:SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="tests/**/TestResults/coverage.opencover.*.xml"
dotnet workload restore
dotnet build
dotnet test --solution Microsoft.Kiota.slnx --no-build --verbosity normal --framework net10.0 -- --coverlet --coverlet-output-format opencover
Expand Down
26 changes: 26 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<!-- Source packages -->
<PackageVersion Include="Azure.Core" Version="1.50.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.3.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0,)" />
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.14.15" />
<PackageVersion Include="Std.UriTemplate" Version="2.0.8" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="[8.0.1,)" />
<PackageVersion Include="System.Net.Http.WinHttpHandler" Version="[10.0,)" />
<PackageVersion Include="System.Text.Json" Version="[8.0,)" />
<!-- Test packages -->
<PackageVersion Include="coverlet.MTP" Version="10.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.7" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.7" />
<PackageVersion Include="Microsoft.Testing.Platform" Version="2.2.2" />
<PackageVersion Include="Moq" Version="4.20.72" />
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.2" />
</ItemGroup>
</Project>
Loading
Loading