-
Notifications
You must be signed in to change notification settings - Fork 9
/
appveyor.yml
52 lines (52 loc) · 2.55 KB
/
appveyor.yml
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
42
43
44
45
46
47
48
49
50
51
52
version: 1.0.{build}
image: Visual Studio 2019
configuration: Release
platform: Any CPU
init:
- git config --global core.autocrlf true
before_build:
- echo /restore /bl >> msbuild.rsp
build:
verbosity: minimal
test_script:
- ps: |
$unitTestAssembly = "Tvl.VisualStudio.MouseFastScroll.UnitTests\bin\$env:CONFIGURATION\net452\Tvl.VisualStudio.MouseFastScroll.UnitTests.dll"
$integrationTestAssembly = "Tvl.VisualStudio.MouseFastScroll.IntegrationTests\bin\$env:CONFIGURATION\net46\Tvl.VisualStudio.MouseFastScroll.IntegrationTests.dll"
$buildProperties = [xml](Get-Content Directory.Build.props)
$openCoverVersion = $buildProperties.SelectSingleNode('/Project/ItemGroup/PackageReference[@Include="OpenCover"]').Version
$openCoverConsole = Join-Path (Join-Path $env:UserProfile '.nuget\packages\') "opencover\$openCoverVersion\tools\OpenCover.Console.exe"
$codecovVersion = $buildProperties.SelectSingleNode('/Project/ItemGroup/PackageReference[@Include="Codecov"]').Version
$codecov = Join-Path (Join-Path $env:UserProfile '.nuget\packages\') "codecov\$codecovVersion\tools\codecov.exe"
&$openCoverConsole `
-register:machine `
-returntargetcode `
-hideskipped:All `
-filter:"+[Tvl*]*" `
-excludebyattribute:*.ExcludeFromCodeCoverage* `
-excludebyfile:*\*Designer.cs `
-output:OpenCover.MouseFastScroll.UnitTests.xml `
-target:"$env:xunit20\xunit.console.x86.exe" `
-targetargs:"$unitTestAssembly -appveyor -noshadow"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
&$openCoverConsole `
-register:machine `
-returntargetcode `
-hideskipped:All `
-filter:"+[Tvl*]*" `
-excludebyattribute:*.ExcludeFromCodeCoverage* `
-excludebyfile:*\*Designer.cs `
-searchdirs:"Tvl.VisualStudio.MouseFastScroll.UnitTests\bin\$env:CONFIGURATION\net452" `
-output:OpenCover.MouseFastScroll.IntegrationTests.xml `
-target:"$env:xunit20\xunit.console.x86.exe" `
-targetargs:"$integrationTestAssembly -appveyor -noshadow"
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
&$codecov -f OpenCover.MouseFastScroll.UnitTests.xml --flag unit
&$codecov -f OpenCover.MouseFastScroll.IntegrationTests.xml --flag integration
artifacts:
- path: 'Tvl.VisualStudio.MouseFastScroll\**\*.vsix'
- path: '\msbuild.binlog'
name: build log
- path: '\OpenCover.MouseFastScroll.UnitTests.xml'
name: Unit test coverage
- path: '\OpenCover.MouseFastScroll.IntegrationTests.xml'
name: Integration test coverage