Merge pull request #426 from tmenier/feature/add_coverage
Feature/add coverage
This commit is contained in:
commit
3e62043f66
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ publish
|
|||||||
TestResult.xml
|
TestResult.xml
|
||||||
*.bak
|
*.bak
|
||||||
.idea
|
.idea
|
||||||
|
lcov.info
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
@call dotnet restore -v m ../
|
@call dotnet restore -v m ../
|
||||||
|
|
||||||
@if ERRORLEVEL 1 (
|
@if ERRORLEVEL 1 (
|
||||||
echo Error! Restoring dependicies failed.
|
echo Error! Restoring dependencies failed.
|
||||||
exit /b 1
|
exit /b 1
|
||||||
) else (
|
) else (
|
||||||
echo Restoring dependicies was successful.
|
echo Restoring dependencies was successful.
|
||||||
)
|
)
|
||||||
|
|
||||||
@set project=..\src\Flurl.Http.CodeGen\Flurl.Http.CodeGen.csproj
|
@set project=..\src\Flurl.Http.CodeGen\Flurl.Http.CodeGen.csproj
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
@cd ..\test\Flurl.Test\
|
@call dotnet test -c Release /p:CollectCoverage=true /p:Threshold=75 /p:Exclude="[NUnit3.*]*" ..\test\Flurl.Test\
|
||||||
@call dotnet test -c Release
|
@if ERRORLEVEL 1 (
|
||||||
@cd ..\..\Build\
|
echo Error! Tests for Flurl failed.
|
||||||
|
exit /b 1
|
||||||
|
)
|
1
Build/test.coverage.cmd
Executable file
1
Build/test.coverage.cmd
Executable file
@ -0,0 +1 @@
|
|||||||
|
dotnet test -c Release /p:CollectCoverage=true /p:Threshold=75 /p:Exclude="[NUnit3.*]*" /p:CoverletOutputFormat=lcov /p:CoverletOutput=../../lcov ../test/Flurl.Test/
|
11
Build/test.coverage.sh
Executable file
11
Build/test.coverage.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
echo "!!WARNING!! This script generates test coverage file and runs tests for netstandard and netcoreapp targets"
|
||||||
|
|
||||||
|
dotnet test -c Release /p:CollectCoverage=true /p:Threshold=75 \
|
||||||
|
/p:Exclude="[NUnit3.*]*" \
|
||||||
|
/p:CoverletOutputFormat=lcov /p:CoverletOutput="${SCRIPT_ROOT}/../../lcov" \
|
||||||
|
"${SCRIPT_ROOT}/../test/Flurl.Test/"
|
@ -3,4 +3,8 @@ set -euo pipefail
|
|||||||
|
|
||||||
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
dotnet test -c Release "${SCRIPT_ROOT}/../Test/Flurl.Test/"
|
echo "!!WARNING!! This script for pipeline test running and checking code coverage for netstandard and netcoreapp targets"
|
||||||
|
|
||||||
|
dotnet test -c Release /p:CollectCoverage=true /p:Threshold=75 \
|
||||||
|
/p:Exclude="[NUnit3.*]*" \
|
||||||
|
"${SCRIPT_ROOT}/../test/Flurl.Test/"
|
@ -6,6 +6,10 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="coverlet.msbuild" Version="2.5.1">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
||||||
<PackageReference Include="NUnit" Version="3.9.0" />
|
<PackageReference Include="NUnit" Version="3.9.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
<Description>A fluent, portable, testable HTTP client library.</Description>
|
<Description>A fluent, portable, testable HTTP client library.</Description>
|
||||||
<PackageProjectUrl>https://flurl.io</PackageProjectUrl>
|
<PackageProjectUrl>https://flurl.io</PackageProjectUrl>
|
||||||
<PackageIconUrl>https://pbs.twimg.com/profile_images/534024476296376320/IuPGZ_bX_400x400.png</PackageIconUrl>
|
<PackageIconUrl>https://pbs.twimg.com/profile_images/534024476296376320/IuPGZ_bX_400x400.png</PackageIconUrl>
|
||||||
<PackageLicenseUrl>https://raw.githubusercontent.com/tmenier/Flurl/master/LICENSE</PackageLicenseUrl>
|
|
||||||
<RepositoryUrl>https://github.com/tmenier/Flurl.git</RepositoryUrl>
|
<RepositoryUrl>https://github.com/tmenier/Flurl.git</RepositoryUrl>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<PackageTags>httpclient rest json http fluent url uri tdd assert async</PackageTags>
|
<PackageTags>httpclient rest json http fluent url uri tdd assert async</PackageTags>
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
<Description>A fluent, portable URL builder. To make HTTP calls off the fluent chain, check out Flurl.Http.</Description>
|
<Description>A fluent, portable URL builder. To make HTTP calls off the fluent chain, check out Flurl.Http.</Description>
|
||||||
<PackageProjectUrl>https://flurl.io</PackageProjectUrl>
|
<PackageProjectUrl>https://flurl.io</PackageProjectUrl>
|
||||||
<PackageIconUrl>https://pbs.twimg.com/profile_images/534024476296376320/IuPGZ_bX_400x400.png</PackageIconUrl>
|
<PackageIconUrl>https://pbs.twimg.com/profile_images/534024476296376320/IuPGZ_bX_400x400.png</PackageIconUrl>
|
||||||
<PackageLicenseUrl>https://raw.githubusercontent.com/tmenier/Flurl/master/LICENSE</PackageLicenseUrl>
|
|
||||||
<RepositoryUrl>https://github.com/tmenier/Flurl.git</RepositoryUrl>
|
<RepositoryUrl>https://github.com/tmenier/Flurl.git</RepositoryUrl>
|
||||||
<RepositoryType>git</RepositoryType>
|
<RepositoryType>git</RepositoryType>
|
||||||
<PackageTags>fluent url uri querystring builder</PackageTags>
|
<PackageTags>fluent url uri querystring builder</PackageTags>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user