File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,25 @@ runs:
5656 aws-secret-access-key : ${{inputs.awsAccessKeySecret}}
5757 aws-region : ${{inputs.awsRegion}}
5858
59- # GitHubActionsTestLogger nuget package should be installed in the test project
60- # coverlet.msbuild nuget package should be installed to generate coverage report
59+ # GitHubActionsTestLogger nuget package should be installed in the test project.
60+ # coverlet.msbuild nuget package should be installed to generate coverage report.
61+ # The loop is necessary to prevent the following error:
62+ # "Could not find a test logger with AssemblyQualifiedName, URI or FriendlyName 'GitHubActions'."
6163 - name : .NET Test
6264 shell : bash
63- run : dotnet test
64- --no-restore
65- --configuration Debug
66- --logger GitHubActions
67- --collect "XPlat Code Coverage"
68- --results-directory "TestResults/"
65+ run : |
66+ for f in $(find . -name "*.Tests.csproj");
67+ do
68+ echo "testing project $f" && \
69+ csprojName=${f##*/} && \
70+ projectName="${csprojName/.csproj/}" && \
71+ dotnet test $f \
72+ --no-restore \
73+ --configuration Debug \
74+ --logger GitHubActions \
75+ --collect "XPlat Code Coverage" \
76+ --results-directory "TestResults/$projectName"
77+ done
6978
7079 # .NET Test puts the coverage file under a random directory [Guid]/coverage.cobertura.xml
7180 # That's why we locate the coverage file first and pass it to the upload script
You can’t perform that action at this time.
0 commit comments