From bd04e6518d98a55326eb5a26016675b7cfc2d55d Mon Sep 17 00:00:00 2001 From: Alex Hyett Date: Mon, 10 Jul 2023 11:47:11 +0100 Subject: [PATCH] Add test results --- .github/workflows/build-and-test.yml | 9 ++++++++- .../GitHubActionsDemo.Api.Integration.Tests.csproj | 5 +++++ .../GitHubActionsDemo.Api.Unit.Tests.csproj | 5 +++++ .../GitHubActionsDemo.Service.Unit.Tests.csproj | 4 ++++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 47ff4ef..ed7b9f3 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -17,4 +17,11 @@ jobs: - name: Build run: dotnet build - name: Run Unit Tests - run: dotnet test --filter Unit --no-restore --verbosity normal \ No newline at end of file + run: dotnet test --filter Unit --no-restore --verbosity normal + - name: Test Report + uses: dorny/test-reporter@v1 + if: success() || failure() + with: + name: Test Results + path: TestResults/*.trx + reporter: dotnet-trx \ No newline at end of file diff --git a/test/GitHubActionsDemo.Api.Integration.Tests/GitHubActionsDemo.Api.Integration.Tests.csproj b/test/GitHubActionsDemo.Api.Integration.Tests/GitHubActionsDemo.Api.Integration.Tests.csproj index 77ed7ee..2ed849a 100644 --- a/test/GitHubActionsDemo.Api.Integration.Tests/GitHubActionsDemo.Api.Integration.Tests.csproj +++ b/test/GitHubActionsDemo.Api.Integration.Tests/GitHubActionsDemo.Api.Integration.Tests.csproj @@ -27,4 +27,9 @@ + + trx%3bLogFileName=$(MSBuildProjectName).trx + $(SolutionDir)/TestResults + + diff --git a/test/GitHubActionsDemo.Api.Unit.Tests/GitHubActionsDemo.Api.Unit.Tests.csproj b/test/GitHubActionsDemo.Api.Unit.Tests/GitHubActionsDemo.Api.Unit.Tests.csproj index 7c04f8c..d5e8165 100644 --- a/test/GitHubActionsDemo.Api.Unit.Tests/GitHubActionsDemo.Api.Unit.Tests.csproj +++ b/test/GitHubActionsDemo.Api.Unit.Tests/GitHubActionsDemo.Api.Unit.Tests.csproj @@ -28,4 +28,9 @@ + + trx%3bLogFileName=$(MSBuildProjectName).trx + $(SolutionDir)/TestResults + + diff --git a/test/GitHubActionsDemo.Service.Unit.Tests/GitHubActionsDemo.Service.Unit.Tests.csproj b/test/GitHubActionsDemo.Service.Unit.Tests/GitHubActionsDemo.Service.Unit.Tests.csproj index c82ba3e..5f2fe7e 100644 --- a/test/GitHubActionsDemo.Service.Unit.Tests/GitHubActionsDemo.Service.Unit.Tests.csproj +++ b/test/GitHubActionsDemo.Service.Unit.Tests/GitHubActionsDemo.Service.Unit.Tests.csproj @@ -28,4 +28,8 @@ + + trx%3bLogFileName=$(MSBuildProjectName).trx + $(SolutionDir)/TestResults +