Skip to content

Commit

Permalink
🔧 Try and format test results even if tests fail
Browse files Browse the repository at this point in the history
CircleCI steps may have an implicit `set -e` that prevents the
remainder of a command from being run if one line fails.
  • Loading branch information
canterberry committed May 29, 2019
1 parent 77e362a commit 99b081a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ jobs:
- run:
name: Testing
command: |
dotnet test --logger trx Blockmason.Link.Tests/Blockmason.Link.Tests.csproj
find . -type f -name '*.trx' | xargs /docker/.dotnet/tools/trx2junit --output Blockmason.Link.Tests/TestResults/junit
mv $(find Blockmason.Link.Tests/TestResults -type f -name '*.xml' | xargs) Blockmason.Link.Tests/TestResults/junit/results.xml
if dotnet test --logger trx Blockmason.Link.Tests/Blockmason.Link.Tests.csproj; then
find . -type f -name '*.trx' | xargs /docker/.dotnet/tools/trx2junit --output Blockmason.Link.Tests/TestResults/junit
mv $(find Blockmason.Link.Tests/TestResults -type f -name '*.xml' | xargs) Blockmason.Link.Tests/TestResults/junit/results.xml
exit 0
else
find . -type f -name '*.trx' | xargs /docker/.dotnet/tools/trx2junit --output Blockmason.Link.Tests/TestResults/junit
mv $(find Blockmason.Link.Tests/TestResults -type f -name '*.xml' | xargs) Blockmason.Link.Tests/TestResults/junit/results.xml
exit 1
fi
- store_test_results:
path: Blockmason.Link.Tests/TestResults

0 comments on commit 99b081a

Please sign in to comment.