forked from okta/okta-sdk-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coverage.sh
41 lines (31 loc) · 823 Bytes
/
coverage.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
function run(){
dotnet tool install --global minicover
dotnet clean ./src/Okta.Sdk.sln
dotnet restore ./src/Okta.Sdk.sln
dotnet build ./src/Okta.Sdk.sln
minicover instrument
dotnet test ./src/Okta.Sdk.IntegrationTests/ --no-build
dotnet test ./src/Okta.Sdk.UnitTests --no-build
minicover uninstrument
minicover htmlreport
}
function clean(){
if [[ -d ./coverage-hits ]]; then
printf "deleting ./coverage-hits\r\n"
rm -fr ./coverage-hits
fi
if [[ -d ./coverage-html/ ]]; then
printf "deleting ./coverage-html\r\n"
rm -fr ./coverage-html
fi
if [[ -f ./coverage.json ]]; then
printf "deleting coverage.json\r\n"
rm coverage.json
fi
}
COMMAND=$1
if [[ -z $1 ]]; then
COMMAND="run"
fi
$COMMAND