Skip to content

Commit 5e869ad

Browse files
authored
Fix CI (#1181)
1 parent b93b197 commit 5e869ad

File tree

8 files changed

+43
-6
lines changed

8 files changed

+43
-6
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
uses: actions/checkout@v4
1818

1919
- name: Setup .NET SDK
20-
uses: actions/setup-dotnet@v3
20+
uses: actions/setup-dotnet@v4
2121
with:
22-
dotnet-version: 7.0.x
22+
dotnet-version: 8.0.x
2323
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
2424
env:
2525
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<TargetFramework>net6.0</TargetFramework>
45
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
56
<NoWarn>$(NoWarn);IDE0060</NoWarn>
67
</PropertyGroup>
8+
79
<ItemGroup>
810
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
911
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.6.0" />
1012
</ItemGroup>
13+
1114
<ItemGroup>
1215
<ProjectReference Include="..\..\src\Transports.AspNetCore\Transports.AspNetCore.csproj" />
1316
<ProjectReference Include="..\..\src\Ui.GraphiQL\Ui.GraphiQL.csproj" />
1417
<ProjectReference Include="..\Samples.Schemas.Chat\Samples.Schemas.Chat.csproj" />
1518
</ItemGroup>
19+
1620
<ItemGroup>
1721
<None Update="host.json">
1822
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1923
</None>
2024
</ItemGroup>
25+
26+
<!-- In-Process .NET 6 Azure Functions can't be built on Linux -->
27+
<ItemGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
28+
<Compile Remove="**/*.cs" />
29+
<PackageReference Remove="Microsoft.Azure.Functions.Extensions" />
30+
<PackageReference Remove="Microsoft.NET.Sdk.Functions" />
31+
<ProjectReference Remove="..\..\src\Transports.AspNetCore\Transports.AspNetCore.csproj" />
32+
<ProjectReference Remove="..\..\src\Ui.GraphiQL\Ui.GraphiQL.csproj" />
33+
<ProjectReference Remove="..\Samples.Schemas.Chat\Samples.Schemas.Chat.csproj" />
34+
</ItemGroup>
35+
2136
</Project>

samples/Samples.Complex/Samples.Complex.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<AssemblyName>GraphQL.Samples.Server</AssemblyName>
66
<RootNamespace>GraphQL.Samples.Server</RootNamespace>
77
<IsPackable>false</IsPackable>
8+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
89
</PropertyGroup>
910

1011
<ItemGroup>

tests/Samples.AzureFunctions.Tests/Samples.AzureFunctions.Tests.csproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,14 @@
1111
<ProjectReference Include="..\Samples.Tests\Samples.Tests.csproj" />
1212
</ItemGroup>
1313

14+
<!-- Skip this project on Linux -->
15+
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
16+
<IsTestProject>false</IsTestProject>
17+
</PropertyGroup>
18+
<ItemGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
19+
<Compile Remove="**/*.cs" />
20+
<ProjectReference Remove="..\..\samples\Samples.AzureFunctions\Samples.AzureFunctions.csproj" />
21+
<ProjectReference Remove="..\Samples.Tests\Samples.Tests.csproj" />
22+
</ItemGroup>
23+
1424
</Project>

tests/Samples.Complex.Tests/Samples.Complex.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../Tests.props" />
33

44
<PropertyGroup>
5-
<TargetFrameworks>net8.0;net6.0;netcoreapp3.1</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
66
<Description>End to end tests for Samples.Server project</Description>
77
</PropertyGroup>
88

tests/Samples.Net48.Tests/Samples.Net48.Tests.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../Tests.props" />
33

44
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
5-
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework><!-- netcoreapp2.1 not testable on Linux anymore -->
66
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">
@@ -22,4 +22,14 @@
2222
<ProjectReference Include="..\Samples.Tests\Samples.Tests.csproj" />
2323
</ItemGroup>
2424

25+
<!-- Skip this project on Linux -->
26+
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
27+
<IsTestProject>false</IsTestProject>
28+
</PropertyGroup>
29+
<ItemGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
30+
<Compile Remove="**/*.cs" />
31+
<ProjectReference Remove="..\..\samples\Samples.Net48\Samples.Net48.csproj" />
32+
<ProjectReference Remove="..\Samples.Tests\Samples.Tests.csproj" />
33+
</ItemGroup>
34+
2535
</Project>

tests/Samples.Tests/Samples.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../Tests.props" />
33

44
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
5-
<TargetFrameworks>net8.0;net6.0;netcoreapp2.1</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
66
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">
@@ -11,6 +11,7 @@
1111
</PropertyGroup>
1212
<PropertyGroup>
1313
<Description>End to end tests for sample projects</Description>
14+
<IsTestProject>false</IsTestProject>
1415
</PropertyGroup>
1516

1617
<ItemGroup>

tests/Transports.AspNetCore.Tests/Transports.AspNetCore.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="../../Tests.props" />
33

44
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' != 'true'">
5-
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
5+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
66
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">

0 commit comments

Comments
 (0)