build: preparing project layout
This commit is contained in:
parent
4577695eff
commit
e7d5dc4e2c
2 changed files with 9 additions and 8 deletions
5
.envrc
5
.envrc
|
@ -1,5 +1,2 @@
|
||||||
# Insert our scripts into the path.
|
|
||||||
export PATH=$PWD/scripts:$PATH
|
export PATH=$PWD/scripts:$PATH
|
||||||
|
use flake || use nix
|
||||||
# Nix flakes are awesome.
|
|
||||||
use flake
|
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
cd $(dirname $0)/..
|
cd $(dirname $0)/..
|
||||||
|
|
||||||
|
if [ -f ./tests/*/*.csproj ]
|
||||||
|
then
|
||||||
./scripts/setup.sh || exit 1
|
./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 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"
|
dotnet tool run reportgenerator -reports:tests/*/TestResults/*/coverage.cobertura.xml -targetdir:./coverage "-reporttypes:Cobertura;TextSummary"
|
||||||
grep "Line coverage" coverage/Summary.txt
|
grep "Line coverage" coverage/Summary.txt
|
||||||
|
fi
|
||||||
|
|
Reference in a new issue