This repository has been archived on 2023-02-02. You can view files and clone it, but cannot push or open issues or pull requests.
mfgames-nitride-cil/scripts/test.sh

13 lines
493 B
Bash
Raw Permalink Normal View History

2022-09-05 21:41:27 +00:00
#!/usr/bin/env sh
cd $(dirname $0)/..
2022-09-06 05:39:35 +00:00
if ls ./tests/*/*.csproj >& /dev/null
2022-09-06 03:23:39 +00:00
then
./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