File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,10 +54,23 @@ jobs:
5454
5555 - name : Run Tests
5656 run : |
57- dotnet test --no-build --configuration ${{ env.BUILD_CONFIGURATION }} \
58- --framework net9.0 \
59- --logger:trx --results-directory:./TestResults \
60- ${{ env.SOLUTION_NAME }}
57+ mkdir -p TestResults
58+ found=false
59+ for proj in $(find . -name "*.Tests.csproj"); do
60+ found=true
61+ echo "Running tests for $proj"
62+ dotnet test "$proj" \
63+ --no-build \
64+ --configuration ${{ env.BUILD_CONFIGURATION }} \
65+ --framework net9.0 \
66+ --logger "trx;LogFileName=$(basename $proj).trx" \
67+ --results-directory ./TestResults
68+ done
69+
70+ if [ "$found" = false ]; then
71+ echo "⚠️ No test projects (*.Tests.csproj) were found in this repository."
72+ exit 1
73+ fi
6174
6275 - name : Upload Test Results
6376 uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments