Add codecov

This commit is contained in:
de4dot 2019-10-05 15:52:24 +02:00
parent 4f14a76785
commit 731716b334
3 changed files with 11 additions and 2 deletions

View File

@ -26,6 +26,15 @@ jobs:
name: nupkg name: nupkg
path: nuget_files path: nuget_files
- name: Upload coverage report
shell: bash
run: |
curl https://codecov.io/bash -o codecov
chmod +x codecov
./codecov -f Iced.UnitTests/coverage.info
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
- name: Upload to nuget.org if it's a new release - name: Upload to nuget.org if it's a new release
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
shell: pwsh shell: pwsh

View File

@ -1,4 +1,4 @@
# Iced [![NuGet](https://img.shields.io/nuget/v/Iced.svg)](https://www.nuget.org/packages/Iced/) [![](https://github.com/0xd4d/iced/workflows/GitHub%20CI/badge.svg)](https://github.com/0xd4d/iced/actions) # Iced [![NuGet](https://img.shields.io/nuget/v/Iced.svg)](https://www.nuget.org/packages/Iced/) [![](https://github.com/0xd4d/iced/workflows/GitHub%20CI/badge.svg)](https://github.com/0xd4d/iced/actions) [![codecov](https://codecov.io/gh/0xd4d/iced/branch/master/graph/badge.svg)](https://codecov.io/gh/0xd4d/iced)
<img align="right" width="160px" height="160px" src="logo.png"> <img align="right" width="160px" height="160px" src="logo.png">

View File

@ -9,7 +9,7 @@ $env:MoreDefineConstants = ''
msbuild -v:m -restore -t:Build -p:Configuration=Release msbuild -v:m -restore -t:Build -p:Configuration=Release
if ($LASTEXITCODE) { exit $LASTEXITCODE } if ($LASTEXITCODE) { exit $LASTEXITCODE }
dotnet test -c Release -f netcoreapp3.0 -p:Exclude='\"[Iced]Iced.Intel.InstructionMemorySizes,[Iced]Iced.Intel.EncoderInternal.OpCodeHandlers,[Iced]Iced.Intel.InstructionInfoInternal.InfoHandlers,[Iced]Iced.Intel.MnemonicUtils,[Iced]Iced.Intel.InstructionOpCounts\"' -p:ExcludeByFile="$PWD\Iced\**\*.g.cs" -p:ExcludeByAttribute='ObsoleteAttribute' -p:CollectCoverage=true -p:CoverletOutputFormat=json --no-build Iced.UnitTests\Iced.UnitTests.csproj -- RunConfiguration.NoAutoReporters=true RunConfiguration.TargetPlatform=X64 dotnet test -c Release -f netcoreapp3.0 -p:Exclude='\"[Iced]Iced.Intel.InstructionMemorySizes,[Iced]Iced.Intel.EncoderInternal.OpCodeHandlers,[Iced]Iced.Intel.InstructionInfoInternal.InfoHandlers,[Iced]Iced.Intel.MnemonicUtils,[Iced]Iced.Intel.InstructionOpCounts\"' -p:ExcludeByFile="$PWD\Iced\**\*.g.cs" -p:ExcludeByAttribute='ObsoleteAttribute' -p:CollectCoverage=true -p:CoverletOutputFormat=lcov --no-build Iced.UnitTests\Iced.UnitTests.csproj -- RunConfiguration.NoAutoReporters=true RunConfiguration.TargetPlatform=X64
if ($LASTEXITCODE) { exit $LASTEXITCODE } if ($LASTEXITCODE) { exit $LASTEXITCODE }
# Don't include the IVT in the final binary # Don't include the IVT in the final binary