Skip to content

Commit

Permalink
Actions: reference logger directly
Browse files Browse the repository at this point in the history
  • Loading branch information
webprofusion-chrisc committed Feb 14, 2025
1 parent 76393a8 commit 60a4f7f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/4_6_2_Core_Unit_Tests_Win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
- name: Install Dependencies & Build Certify.Core.Tests.Unit
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.4
dotnet add package GitHubActionsTestLogger
dotnet build -c Debug -f net462 --property WarningLevel=0 /clp:ErrorsOnly
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/DotNetCore_Unit_Tests_Linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,12 @@ jobs:
- name: Install Dependencies & Build Certify.Core.Tests.Unit
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.4
dotnet add package GitHubActionsTestLogger
dotnet build Certify.Core.Tests.Unit.csproj -c Debug -f net9.0 --property WarningLevel=0 /clp:ErrorsOnly
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

- name: Run Certify.Core.Tests.Unit Tests
run: |
export GITHUB_WORKSPACE="$GITHUB_WORKSPACE/certify"
export GITHUB_STEP_SUMMARY="./TestResults-${{ runner.os }}/test-summary.md"
dotnet test --no-build -f net9.0 -l "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true;annotations.messageFormat=@error\n@trace"
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/DotNetCore_Unit_Tests_Win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
- name: Install Dependencies & Build Certify.Core.Tests.Unit
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.4.4
dotnet add package GitHubActionsTestLogger
dotnet build Certify.Core.Tests.Unit.csproj -c Debug -f net9.0 --property WarningLevel=0 /clp:ErrorsOnly
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit

Expand All @@ -104,10 +103,10 @@ jobs:
working-directory: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit
if: ${{ always() }}

# - name: Upload dotnet test Artifacts
# uses: actions/upload-artifact@master
# with:
# name: dotnet-results-${{ runner.os }}-${{ env.DOTNET_VERSION }}
# path: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit/TestResults-9_0-${{ runner.os }}
# # Use always() to always run this step to publish test results when there are test failures
# if: ${{ always() }}
- name: Upload dotnet test Artifacts
uses: actions/upload-artifact@main
with:
name: dotnet-results-${{ runner.os }}-${{ env.DOTNET_VERSION }}
path: ./certify/src/Certify.Tests/Certify.Core.Tests.Unit/TestResults-${{ runner.os }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="GitHubActionsTestLogger" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MedallionShell" Version="1.6.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.2" />
<PackageReference Include="Moq" Version="4.20.72" />
Expand Down

0 comments on commit 60a4f7f

Please sign in to comment.