diff --git a/.github/workflows/nightlybuild.yml b/.github/workflows/nightlybuild.yml
index bd2980d0..89ca3685 100644
--- a/.github/workflows/nightlybuild.yml
+++ b/.github/workflows/nightlybuild.yml
@@ -30,6 +30,11 @@ jobs:
rmz_version: "3.1.1" # Required when rm_cmd is 'rmz'
testing: false
+ - name: Setup .NET SDK
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 10.0.400
+
- name: Set Up Variables
run: echo "action_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV
@@ -42,17 +47,17 @@ jobs:
- name: Run Unit Tests
run: |
echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}"
- dotnet test "TransactionProcessor.BusinessLogic.Tests\TransactionProcessor.BusinessLogic.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
- dotnet test "TransactionProcessor.ProjectionEngine.Tests\TransactionProcessor.ProjectionEngine.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
- dotnet test "TransactionProcessor.Aggregates.Tests\TransactionProcessor.Aggregates.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov3.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
- dotnet test "TransactionProcessor.Tests\TransactionProcessor.Tests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov4.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
- dotnet test "TransactionProcessor.DatabaseTests\TransactionProcessor.DatabaseTests.csproj" /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov5.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
+ dotnet test "TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj" --no-restore /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov1.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
+ dotnet test "TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj" --no-restore /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov2.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
+ dotnet test "TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj" --no-restore /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov3.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
+ dotnet test "TransactionProcessor.Tests/TransactionProcessor.Tests.csproj" --no-restore /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov4.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
+ dotnet test "TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj" --no-restore /p:CollectCoverage=true /p:Exclude="[xunit*]*" /p:ExcludeByAttribute="Obsolete" /p:ExcludeByAttribute="GeneratedCodeAttribute" /p:ExcludeByAttribute="CompilerGeneratedAttribute" /p:ExcludeByAttribute="ExcludeFromCodeCoverageAttribute" /p:CoverletOutput="../lcov5.info" /maxcpucount:1 /p:CoverletOutputFormat="lcov"
- name: Build Docker Image
run: docker build . --file TransactionProcessor/Dockerfile --tag transactionprocessor:latest
- name: Run Integration Tests
- run: dotnet test "TransactionProcessor.IntegrationTests\TransactionProcessor.IntegrationTests.csproj"
+ run: dotnet test "TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj" --no-restore --report-trx --report-trx-filename "integration-test-results.trx"
- uses: actions/upload-artifact@v4.4.0
if: always()
diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml
index 0b5b037e..6b717138 100644
--- a/.github/workflows/pullrequest.yml
+++ b/.github/workflows/pullrequest.yml
@@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4
-
+
- name: Free Disk Space
uses: endersonmenezes/free-disk-space@v3 # Use @main for latest, @v3 for stable
with:
@@ -25,6 +25,11 @@ jobs:
rmz_version: "3.1.1" # Required when rm_cmd is 'rmz'
testing: false
+ - name: Setup .NET SDK
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 10.0.400
+
- name: Restore Nuget Packages
run: dotnet restore TransactionProcessor.sln --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }}
@@ -35,11 +40,11 @@ jobs:
- name: Run Unit Tests
run: |
echo "ASPNETCORE_ENVIRONMENT are > ${ASPNETCORE_ENVIRONMENT}"
- dotnet test "TransactionProcessor.BusinessLogic.Tests\TransactionProcessor.BusinessLogic.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=buslogic-test-results.trx"
- dotnet test "TransactionProcessor.ProjectionEngine.Tests\TransactionProcessor.ProjectionEngine.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=projection-test-results.trx"
- dotnet test "TransactionProcessor.Aggregates.Tests\TransactionProcessor.Aggregates.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=aggregates-test-results.trx"
- dotnet test "TransactionProcessor.Tests\TransactionProcessor.Tests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=tests-test-results.trx"
- dotnet test "TransactionProcessor.DatabaseTests\TransactionProcessor.DatabaseTests.csproj" --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=database-test-results.trx"
+ dotnet test "TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj" --configuration Release --no-restore --verbosity normal --report-xunit-trx --report-xunit-trx-filename "buslogic-test-results.trx"
+ dotnet test "TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj" --configuration Release --no-restore --verbosity normal --report-xunit-trx --report-xunit-trx-filename "projection-test-results.trx"
+ dotnet test "TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj" --configuration Release --no-restore --verbosity normal --report-xunit-trx --report-xunit-trx-filename "aggregates-test-results.trx"
+ dotnet test "TransactionProcessor.Tests/TransactionProcessor.Tests.csproj" --configuration Release --no-restore --verbosity normal --report-xunit-trx --report-xunit-trx-filename "tests-test-results.trx"
+ dotnet test "TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj" --configuration Release --no-restore --verbosity normal --report-xunit-trx --report-xunit-trx-filename "database-test-results.trx"
- name: Build Docker Image
run: docker build . --file TransactionProcessor/Dockerfile --tag transactionprocessor:latest
@@ -59,7 +64,7 @@ jobs:
FLUENTDOCKER_DOCKER_USE_SUDO: "false"
FLUENTDOCKER_DOCKER_PATH: "/usr/bin/docker"
run: |
- dotnet test "TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj" --filter Category=PRTest --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=integration-test-results.trx"
+ dotnet test "TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj" --filter Category=PRTest --configuration Release --no-restore --verbosity normal --report-trx --report-trx-filename "integration-test-results.trx"
- uses: actions/upload-artifact@v4.4.0
if: always()
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 8ff98f4f..e7e206e8 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,25 +9,25 @@
-
+
-
-
+
+
-
-
+
+
-
+
@@ -37,21 +37,22 @@
+
-
+
-
+
-
-
-
-
+
+
+
+
@@ -60,15 +61,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -84,10 +85,11 @@
-
-
-
-
+
+
+
+
+
diff --git a/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj b/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj
index 6064853a..79809eb5 100644
--- a/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj
+++ b/TransactionProcessor.Aggregates.Tests/TransactionProcessor.Aggregates.Tests.csproj
@@ -7,6 +7,9 @@
None
false
true
+ Exe
+ true
+ true
@@ -14,7 +17,6 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
@@ -23,11 +25,7 @@
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj b/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj
index bf0ff847..3ca16d44 100644
--- a/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj
+++ b/TransactionProcessor.BusinessLogic.Tests/TransactionProcessor.BusinessLogic.Tests.csproj
@@ -4,13 +4,15 @@
net10.0
None
false
+ Exe
+ true
+ true
-
@@ -24,11 +26,7 @@
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj b/TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj
index b1244687..d86f1a82 100644
--- a/TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj
+++ b/TransactionProcessor.DatabaseTests/TransactionProcessor.DatabaseTests.csproj
@@ -6,6 +6,9 @@
enable
false
Full
+ Exe
+ true
+ true
@@ -15,17 +18,12 @@
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj
index ec786756..f4368093 100644
--- a/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj
+++ b/TransactionProcessor.IntegrationTests/TransactionProcessor.IntegrationTests.csproj
@@ -4,6 +4,9 @@
net10.0
Full
false
+ true
+ Exe
+ true
@@ -27,6 +30,7 @@
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj b/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj
index c7f49785..9ee770e7 100644
--- a/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj
+++ b/TransactionProcessor.ProjectionEngine.Tests/TransactionProcessor.ProjectionEngine.Tests.csproj
@@ -6,23 +6,20 @@
enable
None
false
+ Exe
+ true
+ true
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj b/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj
index 8240e1a4..21eb35b2 100644
--- a/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj
+++ b/TransactionProcessor.Tests/TransactionProcessor.Tests.csproj
@@ -4,6 +4,9 @@
net10.0
None
false
+ Exe
+ true
+ true
@@ -12,7 +15,6 @@
-
@@ -25,11 +27,7 @@
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/global.json b/global.json
new file mode 100644
index 00000000..3140116d
--- /dev/null
+++ b/global.json
@@ -0,0 +1,5 @@
+{
+ "test": {
+ "runner": "Microsoft.Testing.Platform"
+ }
+}