diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
deleted file mode 100644
index 213d2e0..0000000
--- a/.config/dotnet-tools.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "version": 1,
- "isRoot": true,
- "tools": {
- "dotnet-sonarscanner": {
- "version": "5.15.0",
- "commands": [
- "dotnet-sonarscanner"
- ]
- }
- }
-}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..81589b1
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,28 @@
+name: CI
+run-name: CI ${{ github.event.pull_request.title }}
+
+on:
+ pull_request:
+
+jobs:
+ tests:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v5
+ with:
+ dotnet-version: |
+ 8
+ 9
+ 10
+
+ - name: Build projects
+ run: dotnet build
+ shell: bash
+
+ - name: Run tests
+ run: dotnet test /p:BuildTestOnly=true
+ shell: bash
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
deleted file mode 100644
index 99cf1f8..0000000
--- a/.github/workflows/pull-request.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-name: Pull Request
-
-on:
- pull_request:
- branches: ["master"]
-
-jobs:
- tests:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- - name: Setup .NET
- uses: actions/setup-dotnet@v3
- with:
- dotnet-version: |
- 8
- 9
-
- - name: Restore tools
- run: dotnet tool restore
- shell: bash
-
- - name: Build projects
- run: |
- for sln in $(find . -name '*.sln'); do
- echo -e "\n\033[0;34mBuilding $sln \033[0m"
- dotnet build "$sln" -c Debug /p:WarningLevel=0
- done
- shell: bash
-
- - name: Run tests
- run: find . -name '*.Tests.csproj' | parallel --jobs 0 'echo -e "\n\033[0;34m{}\033[0m\n" && dotnet test {} -c Debug --no-build -p:"CollectCoverage=true" -p:"Exclude=[xunit.*]*" -p:"CoverletOutputFormat=opencover"'
- shell: bash
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 587b413..2e13138 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,4 +1,5 @@
name: Release
+run-name: Release ${{ github.ref_name }}
on:
push:
@@ -11,36 +12,45 @@ jobs:
steps:
- name: Checkout code
- uses: actions/checkout@v2
+ uses: actions/checkout@v6
- - name: Use .NET SDK from global.json
- uses: actions/setup-dotnet@v3
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8
9
+ 10
- - name: Extract package version
- run: echo "PACKAGE_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- shell: bash
-
- - name: Extract assembly version
- run: echo "ASSEMBLY_VERSION=$(echo ${{ github.ref_name }} | grep -o '^[0-9]*\.[0-9]*\.[0-9]*').0" >> $GITHUB_ENV
+ - name: Extract version
+ id: extract_version
shell: bash
+ run: |
+ PACKAGE_VERSION="${{ github.ref_name }}"
+ ASSEMBLY_VERSION="$(echo ${{ github.ref_name }} | grep -o '^[0-9]*\.[0-9]*\.[0-9]*').0"
+ echo "package_version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
+ echo "assembly_version=$ASSEMBLY_VERSION" >> $GITHUB_OUTPUT
+ echo "Package Version: $PACKAGE_VERSION"
+ echo "Assembly Version: $ASSEMBLY_VERSION"
- name: Build projects
- run: |
- for sln in $(find . -name '*.sln'); do
- echo -e "\n\033[0;34mBuilding $sln \033[0m"
- dotnet build "$sln" -c Release /p:Version=${{ env.PACKAGE_VERSION }} /p:AssemblyVersion=${{ env.ASSEMBLY_VERSION }} /p:FileVersion=${{ env.ASSEMBLY_VERSION }}
- done
shell: bash
+ run: dotnet build -c Release
- name: Pack
- run: find . -name '*.sln' | parallel --jobs 0 'dotnet pack {} /p:PackageVersion=${{env.PACKAGE_VERSION}} -c Release -o ./out --no-build --include-symbols --include-source --verbosity Minimal'
shell: bash
+ run: |
+ dotnet pack \
+ -c Release -o \
+ ./out --no-build \
+ --include-symbols \
+ --include-source \
+ --verbosity Minimal \
+ /p:Version=${{ steps.extract_version.outputs.package_version }} \
+ /p:AssemblyVersion=${{ steps.extract_version.outputs.assembly_version }} \
+ /p:FileVersion=${{ steps.extract_version.outputs.assembly_version }}
- name: Push
- run: |
- find . -name '*.nupkg' | grep -v '.sources.nupkg' | parallel --jobs 0 'dotnet nuget push {} --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json'
shell: bash
+ run: |
+ find . -name '*.nupkg' | grep -v '.sources.nupkg' | parallel --jobs 0 'dotnet nuget push {} --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json'
\ No newline at end of file
diff --git a/src/Package.props b/Directory.Build.props
similarity index 60%
rename from src/Package.props
rename to Directory.Build.props
index f3a7197..9dd12de 100644
--- a/src/Package.props
+++ b/Directory.Build.props
@@ -1,6 +1,34 @@
+
+ $(NoWarn);SYSLIB1006;SYSLIB1015;CS8618;CS8602
+
+
+
+ net8.0;net9.0;net10.0
+ netstandard2.0;net462;net8.0;net9.0;net10.0
+
+
+
+ Full
+ true
+
+
+
+ pdbonly
+ true
+
+ preview
+ enable
+ enable
+ false
+ false
+ false
+
+
+
+ 0.0.0
Snapshooter
Swiss Life authors and contributors
Swiss Life
@@ -11,8 +39,7 @@
XUnit SwissLife Snapshot UnitTest Test IntegrationTest SystemTest DatabaseTest .Net
true
https://github.com/SwissLife-OSS/snapshooter/raw/master/logo.png
- false
- 11.0
+ GIT
@@ -26,7 +53,7 @@
-
+
diff --git a/all.csproj b/all.csproj
new file mode 100644
index 0000000..2acaa79
--- /dev/null
+++ b/all.csproj
@@ -0,0 +1,16 @@
+
+
+
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/benchmark/Snapshooter.Benchmarks/Snapshooter.Benchmarks.csproj b/benchmark/Snapshooter.Benchmarks/Snapshooter.Benchmarks.csproj
index d2d5126..7ba1918 100644
--- a/benchmark/Snapshooter.Benchmarks/Snapshooter.Benchmarks.csproj
+++ b/benchmark/Snapshooter.Benchmarks/Snapshooter.Benchmarks.csproj
@@ -2,7 +2,8 @@
Exe
- net8.0
+
+ net10.0
enable
enable
false
diff --git a/global.json b/global.json
index 93e6dbd..376af49 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,5 @@
{
"sdk": {
- "version": "9.0.101",
- "rollForward": "latestMinor"
+ "version": "10.0.100"
}
}
diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props
new file mode 100644
index 0000000..15769f3
--- /dev/null
+++ b/samples/Directory.Build.props
@@ -0,0 +1,8 @@
+
+
+
+
+
+ net10.0
+
+
diff --git a/samples/Snapshooter.Examples.Xunit/Snapshooter.Examples.Xunit.csproj b/samples/Snapshooter.Examples.Xunit/Snapshooter.Examples.Xunit.csproj
index 8e70a40..dc6ba20 100644
--- a/samples/Snapshooter.Examples.Xunit/Snapshooter.Examples.Xunit.csproj
+++ b/samples/Snapshooter.Examples.Xunit/Snapshooter.Examples.Xunit.csproj
@@ -1,11 +1,8 @@
- net7
- false
Snapshooter.Examples.Xunit
Snapshooter.Examples.Xunit
- true
@@ -17,10 +14,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers
-
diff --git a/samples/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj b/samples/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
index 5003b63..3cf0e23 100644
--- a/samples/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
+++ b/samples/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
@@ -1,11 +1,8 @@
- net7
Snapshooter.Tests.Data
Snapshooter.Tests.Data
- false
- false
diff --git a/src/Dependencies.props b/src/Dependencies.props
deleted file mode 100644
index de63339..0000000
--- a/src/Dependencies.props
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- netstandard2.0;net462;net6.0;net8.0;net9.0
-
-
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 84dc8b9..106b127 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,16 +1,3 @@
-
- $(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'Settings.props'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'Version.props'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'Package.props'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'ResourceProject.props'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'Dependencies.props'))
-
-
-
-
-
-
-
+
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
deleted file mode 100644
index c5c2a4b..0000000
--- a/src/Directory.Build.targets
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
diff --git a/src/ResourceProject.props b/src/ResourceProject.props
deleted file mode 100644
index a9b7cd0..0000000
--- a/src/ResourceProject.props
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- $(ResourceProjectTargetFrameworks)
- Snapshooter
- true
-
-
-
- Full
- true
-
-
-
- pdbonly
- true
-
-
-
diff --git a/src/Snapshooter.Json/Snapshooter.Json.csproj b/src/Snapshooter.Json/Snapshooter.Json.csproj
index d3328df..45c65e6 100644
--- a/src/Snapshooter.Json/Snapshooter.Json.csproj
+++ b/src/Snapshooter.Json/Snapshooter.Json.csproj
@@ -1,6 +1,5 @@
-
-
+
Snapshooter.Json
Snapshooter.Json
@@ -9,7 +8,7 @@
Json Snapshooter is a flexible snapshot testing tool for .Net unit tests.
It creates and asserts json snapshots in unit tests without any .Net test framework required.
- false
+ true
diff --git a/src/Snapshooter.MSTest/Snapshooter.MSTest.csproj b/src/Snapshooter.MSTest/Snapshooter.MSTest.csproj
index 9bf3cf8..a60dc4d 100644
--- a/src/Snapshooter.MSTest/Snapshooter.MSTest.csproj
+++ b/src/Snapshooter.MSTest/Snapshooter.MSTest.csproj
@@ -1,6 +1,5 @@
-
-
+
Snapshooter.MSTest
Snapshooter.MSTest
@@ -9,7 +8,7 @@
MSTest Snapshooter is a flexible snapshot testing tool for .Net unit tests with MSTest.
It creates and asserts snapshots (json format) within MSTest unit tests.
- false
+ true
diff --git a/src/Snapshooter.NUnit/Snapshooter.NUnit.csproj b/src/Snapshooter.NUnit/Snapshooter.NUnit.csproj
index 0eaa945..317eb41 100644
--- a/src/Snapshooter.NUnit/Snapshooter.NUnit.csproj
+++ b/src/Snapshooter.NUnit/Snapshooter.NUnit.csproj
@@ -1,6 +1,5 @@
-
-
+
Snapshooter.NUnit
Snapshooter.NUnit
@@ -9,7 +8,7 @@
NUnit Snapshooter is a flexible snapshot testing tool for .Net unit tests with NUnit.
It creates and asserts snapshots (json format) within NUnit unit tests.
- false
+ true
diff --git a/src/Snapshooter.TUnit/Snapshooter.TUnit.csproj b/src/Snapshooter.TUnit/Snapshooter.TUnit.csproj
index 073b244..702e133 100644
--- a/src/Snapshooter.TUnit/Snapshooter.TUnit.csproj
+++ b/src/Snapshooter.TUnit/Snapshooter.TUnit.csproj
@@ -1,8 +1,6 @@
-
-
+
- net8.0
Snapshooter.TUnit
Snapshooter.TUnit
Snapshooter.TUnit
@@ -10,7 +8,7 @@
TUnit Snapshooter is a flexible snapshot testing tool for .Net unit tests with TUnit.
It creates and asserts snapshots (json format) within TUnit unit tests.
- false
+ true
diff --git a/src/Snapshooter.Xunit/Snapshooter.Xunit.csproj b/src/Snapshooter.Xunit/Snapshooter.Xunit.csproj
index 2c6c674..5259772 100644
--- a/src/Snapshooter.Xunit/Snapshooter.Xunit.csproj
+++ b/src/Snapshooter.Xunit/Snapshooter.Xunit.csproj
@@ -1,6 +1,5 @@
-
-
+
Snapshooter.Xunit
Snapshooter.Xunit
@@ -9,7 +8,7 @@
Xunit Snapshooter is a flexible snapshot testing tool for .Net unit tests with Xunit.
It creates and asserts snapshots (json) within Xunit unit tests.
- false
+ true
diff --git a/src/Snapshooter.Xunit3/Snapshooter.Xunit3.csproj b/src/Snapshooter.Xunit3/Snapshooter.Xunit3.csproj
index 6c4a0d3..3a75fcd 100644
--- a/src/Snapshooter.Xunit3/Snapshooter.Xunit3.csproj
+++ b/src/Snapshooter.Xunit3/Snapshooter.Xunit3.csproj
@@ -1,8 +1,7 @@
-
-
+
- net8.0
+ net8.0;net9.0;net10.0
Snapshooter.Xunit3
Snapshooter.Xunit3
Snapshooter.Xunit3
@@ -10,12 +9,12 @@
Xunit Snapshooter is a flexible snapshot testing tool for .Net unit tests with Xunit.
It creates and asserts snapshots (json) within Xunit unit tests.
- false
+ true
-
-
+
+
diff --git a/src/Snapshooter/Snapshooter.csproj b/src/Snapshooter/Snapshooter.csproj
index 28845fc..d7c8779 100644
--- a/src/Snapshooter/Snapshooter.csproj
+++ b/src/Snapshooter/Snapshooter.csproj
@@ -1,12 +1,11 @@
-
-
+
Snapshooter
Snapshooter
Snapshooter
Snapshooter core functionalities to create and assert snapshots in .Net unit tests.
- false
+ true
diff --git a/src/Version.props b/src/Version.props
deleted file mode 100644
index 1f8399b..0000000
--- a/src/Version.props
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- 0.0.0
-
-
-
\ No newline at end of file
diff --git a/test/Dependencies.props b/test/Dependencies.props
deleted file mode 100644
index 39348eb..0000000
--- a/test/Dependencies.props
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- net8.0;net9.0
-
-
diff --git a/test/Directory.Build.props b/test/Directory.Build.props
index 1fb45cc..5ab07f6 100644
--- a/test/Directory.Build.props
+++ b/test/Directory.Build.props
@@ -1,12 +1,4 @@
-
- $(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'Settings.props'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'TestProject.props'))
- $([System.IO.Path]::Combine($(CCSourceDirectory), 'Dependencies.props'))
-
-
-
-
-
+
+
diff --git a/test/Snapshooter.Environment.Tests/Snapshooter.Environment.Tests.csproj b/test/Snapshooter.Environment.Tests/Snapshooter.Environment.Tests.csproj
index 19264f4..09bbba9 100644
--- a/test/Snapshooter.Environment.Tests/Snapshooter.Environment.Tests.csproj
+++ b/test/Snapshooter.Environment.Tests/Snapshooter.Environment.Tests.csproj
@@ -1,10 +1,8 @@
-
Snapshooter.Environment.Tests
Snapshooter.Environment.Tests
- true
@@ -14,10 +12,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/test/Snapshooter.Json.Tests/Snapshooter.Json.Tests.csproj b/test/Snapshooter.Json.Tests/Snapshooter.Json.Tests.csproj
index 2c1ccd8..f65b598 100644
--- a/test/Snapshooter.Json.Tests/Snapshooter.Json.Tests.csproj
+++ b/test/Snapshooter.Json.Tests/Snapshooter.Json.Tests.csproj
@@ -1,10 +1,8 @@
-
-
+
Snapshooter.Json.Tests
Snapshooter.Json.Tests
- true
@@ -14,10 +12,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/test/Snapshooter.MSTest.Tests/Snapshooter.MSTest.Tests.csproj b/test/Snapshooter.MSTest.Tests/Snapshooter.MSTest.Tests.csproj
index 8f413d2..2f7ad83 100644
--- a/test/Snapshooter.MSTest.Tests/Snapshooter.MSTest.Tests.csproj
+++ b/test/Snapshooter.MSTest.Tests/Snapshooter.MSTest.Tests.csproj
@@ -1,10 +1,8 @@
-
-
+
Snapshooter.MSTest.Tests
Snapshooter.MSTest.Tests
- true
diff --git a/test/Snapshooter.NUnit.Tests/Snapshooter.NUnit.Tests.csproj b/test/Snapshooter.NUnit.Tests/Snapshooter.NUnit.Tests.csproj
index 5484b7c..9c9a426 100644
--- a/test/Snapshooter.NUnit.Tests/Snapshooter.NUnit.Tests.csproj
+++ b/test/Snapshooter.NUnit.Tests/Snapshooter.NUnit.Tests.csproj
@@ -1,10 +1,8 @@
-
-
+
Snapshooter.NUnit.Tests
Snapshooter.NUnit.Tests
- true
diff --git a/test/Snapshooter.TUnit.Tests/Snapshooter.TUnit.Tests.csproj b/test/Snapshooter.TUnit.Tests/Snapshooter.TUnit.Tests.csproj
index e89bde3..a220e43 100644
--- a/test/Snapshooter.TUnit.Tests/Snapshooter.TUnit.Tests.csproj
+++ b/test/Snapshooter.TUnit.Tests/Snapshooter.TUnit.Tests.csproj
@@ -1,12 +1,8 @@
-
-
+
- net8.0
Snapshooter.TUnit.Tests
Snapshooter.TUnit.Tests
- true
- latest
diff --git a/test/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj b/test/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
index 9fd1ace..681c873 100644
--- a/test/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
+++ b/test/Snapshooter.Tests.Data/Snapshooter.Tests.Data.csproj
@@ -1,10 +1,8 @@
-
-
+
Snapshooter.Tests.Data
Snapshooter.Tests.Data
- false
diff --git a/test/Snapshooter.Tests/Snapshooter.Tests.csproj b/test/Snapshooter.Tests/Snapshooter.Tests.csproj
index 5bc8129..3bba3c9 100644
--- a/test/Snapshooter.Tests/Snapshooter.Tests.csproj
+++ b/test/Snapshooter.Tests/Snapshooter.Tests.csproj
@@ -1,10 +1,8 @@
-
-
+
Snapshooter.Tests
Snapshooter.Tests
- true
@@ -13,10 +11,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/test/Snapshooter.Xunit.Tests/Snapshooter.Xunit.Tests.csproj b/test/Snapshooter.Xunit.Tests/Snapshooter.Xunit.Tests.csproj
index e4fbec9..53214f2 100644
--- a/test/Snapshooter.Xunit.Tests/Snapshooter.Xunit.Tests.csproj
+++ b/test/Snapshooter.Xunit.Tests/Snapshooter.Xunit.Tests.csproj
@@ -1,10 +1,8 @@
-
-
+
Snapshooter.Xunit.Tests
Snapshooter.Xunit.Tests
- true
@@ -14,41 +12,6 @@
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/Snapshooter.Xunit3.Tests/Snapshooter.Xunit3.Tests.csproj b/test/Snapshooter.Xunit3.Tests/Snapshooter.Xunit3.Tests.csproj
index 4a3680f..7679585 100644
--- a/test/Snapshooter.Xunit3.Tests/Snapshooter.Xunit3.Tests.csproj
+++ b/test/Snapshooter.Xunit3.Tests/Snapshooter.Xunit3.Tests.csproj
@@ -1,50 +1,13 @@
-
-
+
Snapshooter.Xunit3.Tests
Snapshooter.Xunit3.Tests
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/test/TestProject.props b/test/Test.props
similarity index 64%
rename from test/TestProject.props
rename to test/Test.props
index f719ddd..412921b 100644
--- a/test/TestProject.props
+++ b/test/Test.props
@@ -1,19 +1,18 @@
- $(TestProjectTargetFrameworks)
- Snapshooter
- false
+ $(NoWarn);S2699;RCS1046;IDE0007;RCS1264
+
+
+
+ $(TestProjectTargetFrameworks)
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+