Skip to content

Commit

Permalink
resolve ci issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Aug 30, 2024
1 parent d0f23bc commit 9383671
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/validatePullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x # To build validate trimming project

- name: Setup JDK for android targets
uses: actions/setup-java@v4
Expand All @@ -45,19 +40,24 @@ jobs:

- name: Install needed dotnet workloads
run: dotnet workload install android macos ios maccatalyst

- name: Lint the code
run: dotnet format --verify-no-changes

- name: Restore nuget dependencies
run: dotnet restore ${{ env.solutionName }}

- name: Lint the code
run: dotnet format --verify-no-changes

- name: Build
run: dotnet build ${{ env.solutionName }} -c Debug /p:UseSharedCompilation=false,IncludeMauiTargets=true

- name: Test
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Debug /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x # To build validate trimming project. We do this late as dotnet format fails and does not respect global.json see https://github.com/dotnet/format/issues/1500

- name: Validate Trimming warnings
run: dotnet publish -c Release -r win-x64 /p:TreatWarningsAsErrors=true /warnaserror -f net8.0
working-directory: ./tests/Microsoft.Graph.DotnetCore.Core.Trimming
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.Graph.Core/Microsoft.Graph.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.1" />
<PackageReference Include="Microsoft.IdentityModel.Validators" Version="8.0.1" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.2" />
<PackageReference Include="Microsoft.IdentityModel.Validators" Version="8.0.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.12.2" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.12.2" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.12.2" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.11.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.11.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.12.2" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.12.2" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.12.2" />
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.11.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.12.2" />
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.11.20">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Graph.Core/Tasks/LargeFileUploadTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ internal static IUploadSession ExtractSessionFromParsable(IParsable uploadSessio
throw new ArgumentException("The Parsable does not contain the 'uploadUrl' property");

// convert to local type as we don't have the type info for the upload session just that it implements IParsable
var uploadSessionStream = KiotaJsonSerializer.SerializeAsStream(uploadSession);
var uploadSessionStream = KiotaSerializer.SerializeAsStream(CoreConstants.MimeTypeNames.Application.Json, uploadSession, false);// just in case there's a backing store
var uploadSessionJsonNode = new JsonParseNode(JsonDocument.Parse(uploadSessionStream).RootElement);
return uploadSessionJsonNode.GetObjectValue(UploadSession.CreateFromDiscriminatorValue);
}
Expand Down

0 comments on commit 9383671

Please sign in to comment.