fix(template): updating tests

This commit is contained in:
D. Moonfire 2022-09-05 22:24:07 -05:00
commit fef3bdb89c

View file

@ -1,8 +1,12 @@
#!/usr/bin/env sh #!/usr/bin/env sh
cd $(dirname $0)/.. cd $(dirname $0)/..
./scripts/setup.sh || exit 1
dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage" if [ -f ./tests/*/*.csproj ]
dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary" then
grep "Line coverage" coverage/Summary.txt ./scripts/setup.sh || exit 1
dotnet test --test-adapter-path:. --logger:"junit;LogFilePath=../artifacts/{assembly}-test-result.xml;MethodFormat=Default;FailureBodyFormat=Verbose" --collect:"XPlat Code Coverage"
dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
grep "Line coverage" coverage/Summary.txt
fi