forked from lucaslorentz/minicover
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·22 lines (18 loc) · 838 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
set -e
export "MiniCover=dotnet run -p src/MiniCover/MiniCover.csproj --"
dotnet restore
dotnet build
$MiniCover instrument --sources "test/**/*.cs" --assemblies "test/**/bin/**/*.dll"
$MiniCover reset
dotnet test --no-build test/MiniCover.XUnit.Tests/MiniCover.XUnit.Tests.csproj
dotnet test --no-build test/MiniCover.NUnit.Tests/MiniCover.NUnit.Tests.csproj
$MiniCover uninstrument
$MiniCover htmlreport --threshold 90
$MiniCover xmlreport --threshold 90
$MiniCover report --threshold 90
$MiniCover opencoverreport --threshold 90
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then
dotnet pack src/MiniCover -c Release --output $PWD/artifacts --version-suffix ci-`date +%Y%m%d%H%M%S`
dotnet nuget push artifacts/*.nupkg -k $NUGET_KEY -s https://api.nuget.org/v3/index.json
fi