Skip to content
Draft
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
18 changes: 7 additions & 11 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
name: build-and-test
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
env:
JsonDiffPatchSolutionPath: src/SystemTextJson.JsonDiffPatch.sln
jobs:
build:
strategy:
matrix:
build-configuration: [ Debug, Release ]
test-target-framework: [ net8.0, net7.0, net6.0 ]
build-configuration: [Debug, Release]
test-target-framework: [net10.0, net8.0]
name: Build And Test (${{ matrix.test-target-framework }}, ${{ matrix.build-configuration }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Setup DotNet
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.x
7.x
6.x
global-json-file: global.json
- name: Restore
run: dotnet restore ${{ env.JsonDiffPatchSolutionPath }}
- name: Build
run: dotnet build -c ${{ matrix.build-configuration }} --no-restore ${{ env.JsonDiffPatchSolutionPath }}
- name: Test
run: dotnet test -c ${{ matrix.build-configuration }} -f ${{ matrix.test-target-framework }} --no-restore --no-build ${{ env.JsonDiffPatchSolutionPath }}

13 changes: 13 additions & 0 deletions SystemTextJson.JsonDiffPatch.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Solution>
<Folder Name="/test/">
<Project Path="test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj" />
<Project Path="test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj" />
<Project Path="test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj" />
<Project Path="test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj" />
<Project Path="test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj" />
</Folder>
<Project Path="src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj" />
<Project Path="src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj" />
<Project Path="src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj" />
<Project Path="src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj" />
</Solution>
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.0;net462</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0;netstandard2.0;net462</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@
<PropertyGroup>
<PackageId>SystemTextJson.JsonDiffPatch</PackageId>
<PackageTags>json;diff;compare;patch;system-text-json;jsondiffpatch</PackageTags>
<Description>High-performance, low-allocating JSON object diff and patch extension for System.Text.Json. Support generating patch document in RFC 6902 JSON Patch format. Provides bonus DeepEquals and DeepClone methods.</Description>
<Description>High-performance, low-allocating JSON object diff and patch extension for
System.Text.Json. Support generating patch document in RFC 6902 JSON Patch format. Provides
bonus DeepEquals and DeepClone methods.</Description>
</PropertyGroup>

<ItemGroup>
<Reference Include="System.Web" Condition="'$(TargetFramework)' == 'net462'" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
<Compile Remove="JsonBytes.cs" />
<None Include="JsonBytes.cs" />
</ItemGroup>
</Project>

</Project>
2 changes: 1 addition & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;net48</TargetFrameworks>
<TargetFrameworks>net10.0;net8.0;net48</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down