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-markdown-cil/scripts/test.sh

13 lines
558 B
Bash
Raw Normal View History

2022-09-06 03:37:35 +00:00
#!/usr/bin/env sh
2022-11-03 00:42:20 +00:00
# Set up logging.
log() { echo "️🧪 $(basename $0): $@"; }
2022-09-06 03:37:35 +00:00
2022-11-03 00:42:20 +00:00
# Move into the root folder and make sure we're set up.
cd $(dirname $0)/..
./scripts/setup.sh || exit 1
2022-09-06 03:37:35 +00:00
2022-11-03 00:42:20 +00:00
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