Skip to content

Commit

Permalink
Merge pull request #25 from rubberduck203/fix-code-cov
Browse files Browse the repository at this point in the history
Fix code cov
  • Loading branch information
rubberduck203 authored Nov 14, 2020
2 parents 1c213ac + 46d2cb2 commit 116f2b9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
12 changes: 5 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ environment:
secure: XqcH4XNIcPF1EAuxfTCmhxV4f4GlLbcYMwY9awynisZu860oD8kb79jyrNzhspU6
build_script:
- cmd: >-
dotnet restore
dotnet build -c release
dotnet build -c Release
test_script:
- cmd: >-
dotnet test tests/gitnstats.test/gitnstats.test.csproj /p:CollectCoverage=true /p:Exclude=\"[gitnstats.core]*,[gitnstats.core.tests]*,[gitnstats]GitNStats.CliView,[gitnstats]GitNStats.Program,[gitnstats]GitNStats.Options,[gitnstats]GitNStats.FileSystem\" /p:CoverletOutput=./bin/coverage.xml /p:CoverletOutputFormat="opencover"
dotnet test tests/gitnstats.core.tests/gitnstats.core.tests.csproj /p:CollectCoverage=true /p:CoverletOutput=./bin/coverage.xml /p:CoverletOutputFormat="opencover"
- ps: |
$env:MSYS_NO_PATHCONV=1
bash test.sh
after_test:
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "tests/gitnstats.test/bin/coverage.xml" -f "tests/gitnstats.core.tests/bin/coverage.xml" -t $env:CODECOV_TOKEN
bash codecov.sh -f "tests/gitnstats.test/bin/coverage.opencover.xml" -f "tests/gitnstats.core.tests/bin/coverage.opencover.xml" -t $env:CODECOV_TOKEN
bash publish.sh
Expand Down
3 changes: 2 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /bin/bash
#!/usr/bin/env bash
set -e

dotnet test tests/gitnstats.test/gitnstats.test.csproj \
/p:CollectCoverage=true \
Expand Down
4 changes: 4 additions & 0 deletions tests/gitnstats.core.tests/gitnstats.core.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\gitnstats.core\gitnstats.core.csproj" />
Expand Down
4 changes: 4 additions & 0 deletions tests/gitnstats.test/gitnstats.test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\gitnstats\gitnstats.csproj" />
Expand Down

0 comments on commit 116f2b9

Please sign in to comment.