Skip to content

Commit fe27fe7

Browse files
csharpfritzCopilot
andcommitted
fix(ci): add --results-directory to dotnet test for TRX output path
The Build and Test workflow was failing because dotnet test writes TRX files to TestResults/ in the CWD (repo root) by default, but the upload-artifact and dorny/test-reporter steps expected them at src/BlazorWebFormsComponents.Test/TestResults/. Adding --results-directory ensures the TRX file lands where both steps can find it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 24b95e8 commit fe27fe7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
run: dotnet build samples/AfterBlazorClientSide/AfterBlazorClientSide.csproj --configuration Release --no-restore
5858

5959
- name: Run tests
60-
run: dotnet test src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
60+
run: dotnet test src/BlazorWebFormsComponents.Test/BlazorWebFormsComponents.Test.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --results-directory src/BlazorWebFormsComponents.Test/TestResults
6161

6262
- name: Upload test results
6363
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)