mirror of
https://github.com/zap-proto/cs.git
synced 2026-10-30 15:05:32 +00:00
- Add .github/workflows/ci.yml (push/PR/dispatch, ubuntu, setup-dotnet@v4
8.0.x). Builds the cross-platform libraries (runtime, generator, compiler,
msbuild-generation) and runs the runtime test suite on net8.0.
- Zap.Net.Runtime.Tests: add a runnable net8.0 target alongside the retained
legacy netcoreapp3.1/net471. net8.0 uses Test.Sdk 17.11.1 (16.x cannot host
a net8.0 testhost) and MSTest 2.2.10 (keeps the non-generic Assert.AreEqual
so existing assertions compile unchanged); RollForward=LatestMajor lets the
testhost run on a newer shared runtime.
- Tag the I/O-bound integration classes (loopback-TCP RPC, anonymous-pipe
frame pump) [TestCategory("Integration")] and exclude them from the default
unit run; they hang/are slow in headless CI. TcpRpcInterop additionally
skips on non-Windows (native ZapCompatTest.exe + kernel32 Job Objects).
- checkout fetch-depth: 0 so Nerdbank.GitVersioning can compute the version
(it hard-fails on a shallow clone).
Local (net8.0): 301 passed / 0 failed (TestCategory!=Integration).
70 lines
3.0 KiB
XML
70 lines
3.0 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<!-- net8.0 is the modern, cross-platform target CI runs. The legacy
|
|
netcoreapp3.1/net471 targets are retained for Windows/full-framework
|
|
parity but require their EOL runtime packs to execute. -->
|
|
<TargetFrameworks>net8.0;netcoreapp3.1;net471</TargetFrameworks>
|
|
|
|
<IsPackable>false</IsPackable>
|
|
|
|
<LangVersion>7.1</LangVersion>
|
|
|
|
<OutputType>Library</OutputType>
|
|
|
|
<Configurations>Debug;Release</Configurations>
|
|
|
|
<RootNamespace>Zap.Net.Runtime.Tests</RootNamespace>
|
|
</PropertyGroup>
|
|
|
|
<!-- The net8.0 testhost rolls forward to whatever shared runtime the CI/dev
|
|
box provides (e.g. a .NET 10 SDK ships only the 10.x runtime), so the
|
|
suite runs without pinning an exact 8.x runtime pack. -->
|
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
|
<RollForward>LatestMajor</RollForward>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netcoreapp2.1|AnyCPU'">
|
|
<DefineConstants>TRACE</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="coverlet.collector" Version="1.2.1">
|
|
<PrivateAssets>all</PrivateAssets>
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
</PackageReference>
|
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.2.0" />
|
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" />
|
|
<PackageReference Include="System.IO.Pipelines" Version="4.7.0" />
|
|
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.10.0" />
|
|
</ItemGroup>
|
|
|
|
<!-- net8.0 testhost: MSTest v1 / Test.Sdk 16.x predate .NET 5 and cannot
|
|
host a net8.0 testhost, so the modern target uses Test.Sdk 17.x.
|
|
MSTest stays on the 2.x line (last with the non-generic
|
|
Assert.AreEqual(object, object) API) so the existing assertions compile
|
|
unchanged; MSTest 3.x's generic Assert.AreEqual<T> would break the
|
|
int-vs-uint comparisons in the test mocks. Legacy TFMs keep their
|
|
original pinned versions below. -->
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
|
|
<PackageReference Include="MSTest.TestAdapter" Version="2.2.10" />
|
|
<PackageReference Include="MSTest.TestFramework" Version="2.2.10" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
|
|
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
|
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\Zap.Net.Runtime\Zap.Net.Runtime.csproj" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|