@@ -13,33 +13,42 @@ jobs:
1313
1414 steps :
1515 - uses : actions/checkout@v4
16-
16+
1717 - name : Setup .NET
1818 uses : actions/setup-dotnet@v3
1919 with :
20- dotnet-version : 5.0.x # Updated to a more recent LTS version
20+ dotnet-version : 5.0.x
2121
2222 - name : Restore dependencies
2323 run : dotnet restore
2424
2525 - name : Build
2626 run : dotnet build --no-restore
2727
28- # Run tests in parts (if categorized)
28+ # Run tests in parts, allow test failure to continue so all tests run and logs available
2929 - name : Run Tests (Part 1)
30- run : dotnet test --no-build --verbosity normal -- filter "Category=Part1" --no-restore
30+ run : dotnet test --no-build --filter "Category=Part1" --no-restore --logger "trx;LogFileName=TestResults_Part1.trx" --results-directory ./TestResults
3131 timeout-minutes : 5
32+ continue-on-error : true
3233
3334 - name : Run Tests (Part 2)
34- run : dotnet test --no-build --verbosity normal -- filter "Category=Part2" --no-restore
35+ run : dotnet test --no-build --filter "Category=Part2" --no-restore --logger "trx;LogFileName=TestResults_Part2.trx" --results-directory ./TestResults
3536 timeout-minutes : 5
37+ continue-on-error : true
3638
37- # Detailed logging for debugging (consider a more structured approach )
39+ # Run all tests with detailed logging and save results (optional, for debug )
3840 - name : Test with Detailed Logging
39- run : dotnet test --no-build --verbosity detailed --no-restore --logger "console;verbosity=detailed"
41+ run : dotnet test --no-build --verbosity detailed --no-restore --logger "trx;LogFileName=TestResults_Detailed.trx" --results-directory ./TestResults
42+ continue-on-error : true
43+
44+ # Upload test results so you can inspect them in GitHub Actions UI
45+ - name : Upload Test Results
46+ uses : actions/upload-artifact@v3
47+ with :
48+ name : TestResults
49+ path : ./TestResults/*.trx
4050
41- # Check for stuck processes if needed (consider additional logic to handle stuck processes )
51+ # Optional: check for stuck vstest processes ( if you want )
4252 - name : Check for Stuck Processes
4353 run : |
4454 tasklist /FI "IMAGENAME eq vstest.console.exe"
45- # Optionally, add logic to kill stuck processes if necessary
0 commit comments