-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
37 lines (32 loc) · 1.76 KB
/
makefile
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
test:
dotnet test "tests/CodEaisy.TinySaas.Tests" \
/p:CollectCoverage=true \
/p:CoverletOutputFormat=\"json,lcov,opencover\" \
/p:ExcludeByFile=\"**/CodEaisy.TinySaas/Ensure.cs,**/CodEaisy.TinySaas/Internals/MultiTenantContainer.cs,**/CodEaisy.TinySaas.Auth/Authorization/AuthorizationMiddlewareResultHandler.cs\" \
/p:CoverletOutput=\"../../coverage/\" \
/p:MergeWith=\"../../coverage/coverage.json\"
rm coverage/coverage.json
visualize_coverage:
make test
make open_coverage_in_browser
open_coverage_in_browser:
reportgenerator "-reports:coverage/coverage.opencover.xml" \
"-reporttypes:Html" "-targetdir:./coverage/html"
open coverage/html/index.html
analyze_pr:
dotnet sonarscanner begin /k:"CodEaisy_TinySaas" /o:"codeaisy" \
/d:sonar.login="${SONAR_TOKEN}" \
/d:sonar.cs.opencover.reportsPaths="./coverage/coverage.opencover.xml" \
/d:sonar.coverage.exclusions="**/CodEaisy.TinySaas/Ensure.cs,**/CodEaisy.TinySaas/Internals/MultiTenantContainer.cs,**/CodEaisy.TinySaas.Auth/Authorization/AuthorizationMiddlewareResultHandler.cs" \
/d:sonar.pullrequest.key=${CHANGE_ID} \
/d:sonar.host.url="https://sonarcloud.io"
dotnet build src
dotnet sonarscanner end /d:sonar.login="${SONAR_TOKEN}"
analyze_br:
dotnet sonarscanner begin /k:"CodEaisy_TinySaas" /o:"codeaisy" \
/d:sonar.login="${SONAR_TOKEN}" \
/d:sonar.cs.opencover.reportsPaths="./coverage/coverage.opencover.xml" \
/d:sonar.coverage.exclusions="**/CodEaisy.TinySaas/Ensure.cs,**/CodEaisy.TinySaas/Internals/MultiTenantContainer.cs,**/CodEaisy.TinySaas.Auth/Authorization/AuthorizationMiddlewareResultHandler.cs" \
/d:sonar.host.url="https://sonarcloud.io"
dotnet build src
dotnet sonarscanner end /d:sonar.login="${SONAR_TOKEN}"