-
Notifications
You must be signed in to change notification settings - Fork 102
/
appveyor.yml
112 lines (95 loc) · 5.83 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: 0.18.0.{build}
os:
- Visual Studio 2017
configuration: Release
platform: Any CPU
environment:
RELEASE_KEY_PASSWORD:
secure: 3+fpAMwxomiOZ5fzpb+3kjV4RvPSn0GRvFp71bZZs3QQr06zNU2Wvu4p77dmTKH+
install:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
nuget install secure-file -ExcludeVersion
NuGetPackages\secure-file\tools\secure-file -decrypt GoogleTestAdapter\Keys\Key_Release.snk.enc -secret $env:RELEASE_KEY_PASSWORD
} else {
# $blockRdp = $true
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
}
before_build:
- cmd: build_preparation
- ps: >-
Start-Process -WorkingDirectory GoogleTestAdapter -FilePath SetVersion.bat -ArgumentList $env:APPVEYOR_BUILD_VERSION
Start-Process -WorkingDirectory GoogleTestAdapter\TestAdapter.Tests -FilePath IgnoreTests.bat -ArgumentList TestExecutorParallelTests.cs::RunTests_ParallelTestExecution_SpeedsUpTestExecution
build:
project: GoogleTestAdapter\GoogleTestAdapter.sln
parallel: true
verbosity: normal
after_build:
- ps: >-
$version = $env:APPVEYOR_BUILD_VERSION.SubString(0, $env:APPVEYOR_BUILD_VERSION.LastIndexOf("."))
$sourceFile = (Resolve-Path ("out\binaries\GoogleTestAdapter\" + $env:CONFIGURATION + "\Packaging.GTA\Packaging.GTA.vsix")).ToString()
$targetFile = $([IO.FileInfo]$sourceFile).DirectoryName + "\GoogleTestAdapter-" + $version + ".vsix"
Copy-Item -Path $sourceFile -Destination $targetFile
$releaseNotesFile = (Resolve-Path ("GoogleTestAdapter\VsPackage.GTA\Resources\ReleaseNotes\" + $version + ".md")).ToString()
$releaseNotes = ([IO.File]::ReadAllLines($releaseNotesFile) -join '\n')
Write-Output("Release notes: " + $releaseNotes)
[IO.File]::WriteAllText("C:\\GTAReleaseNotes.txt", $releaseNotes)
test_script:
- ps: >-
$opencover = (Resolve-Path "NuGetPackages/OpenCover.*/tools/OpenCover.Console.exe").ToString()
& $opencover -register:user -target:VsTest.Console.exe "-targetargs:/Logger:Appveyor /TestCaseFilter:`"TestCategory=Unit`" out\binaries\GoogleTestAdapter\$env:CONFIGURATION\DiaResolver.Tests\GoogleTestAdapter.DiaResolver.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\Core.Tests\GoogleTestAdapter.Core.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\TestAdapter.Tests\GoogleTestAdapter.TestAdapter.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\VsPackage.GTA.Tests.Unit\GoogleTestAdapter.VsPackage.GTA.Tests.Unit.dll" "-filter:+[*]* -[*Tests]* -[*Tests.Unit]* -[*Tests.Common]* -[FluentAssertions*]* -[CommonMark*]*" -excludebyfile:*.Designer.cs -output:OpenCover_Unit_CoverageData.xml -returntargetcode
$TestExitCode = $LASTEXITCODE
& $opencover -register:user -target:VsTest.Console.exe "-targetargs:/Logger:Appveyor /TestCaseFilter:`"TestCategory=Integration|TestCategory=Load`" out\binaries\GoogleTestAdapter\$env:CONFIGURATION\DiaResolver.Tests\GoogleTestAdapter.DiaResolver.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\Core.Tests\GoogleTestAdapter.Core.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\TestAdapter.Tests\GoogleTestAdapter.TestAdapter.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\VsPackage.GTA.Tests.Unit\GoogleTestAdapter.VsPackage.GTA.Tests.Unit.dll" "-filter:+[*]* -[*Tests]* -[*Tests.Unit]* -[*Tests.Common]* -[FluentAssertions*]* -[CommonMark*]*" -excludebyfile:*.Designer.cs -output:OpenCover_Integration_CoverageData.xml -returntargetcode
if ($LASTEXITCODE -ne 0) {
$TestExitCode = $LASTEXITCODE
}
& VsTest.Console out\binaries\GoogleTestAdapter\$env:CONFIGURATION\VsPackage.Tests\GoogleTestAdapter.VsPackage.Tests.dll out\binaries\GoogleTestAdapter\$env:CONFIGURATION\VsPackage.Tests.Generated\GoogleTestAdapter.VsPackage.Tests.Generated.dll /TestCaseFilter:"TestCategory=End to end" /Logger:Appveyor
if ($LASTEXITCODE -ne 0) {
$TestExitCode = $LASTEXITCODE
}
if (Test-Path GoogleTestAdapter\VsPackage.Tests.Generated\TestErrors) {
7z a TestErrors.zip GoogleTestAdapter\VsPackage.Tests.Generated\TestErrors\*
Push-AppveyorArtifact TestErrors.zip
}
if ($TestExitCode -ne 0) {
$version = $env:APPVEYOR_BUILD_VERSION.SubString(0, $env:APPVEYOR_BUILD_VERSION.LastIndexOf("."))
$sourceFile = (Resolve-Path ("out\binaries\GoogleTestAdapter\" + $env:CONFIGURATION + "\Packaging.GTA\Packaging.GTA.vsix")).ToString()
$targetFile = $([IO.FileInfo]$sourceFile).DirectoryName + "\GoogleTestAdapter-" + $version + ".vsix"
$nugetFile = $([IO.FileInfo]$sourceFile).DirectoryName + "\GoogleTestAdapter." + $version + ".nupkg"
Push-AppveyorArtifact $targetFile
Push-AppveyorArtifact $nugetFile
exit $TestExitCode
}
after_test:
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- pip install codecov
- codecov -f "OpenCover_Unit_CoverageData.xml" -F Unit
- codecov -f "OpenCover_Integration_CoverageData.xml" -F Integration
before_deploy:
- set /p RELEASE_NOTES=<"C:\\GTAReleaseNotes.txt"
artifacts:
- path: out\binaries\GoogleTestAdapter\$(configuration)\Packaging.GTA\GoogleTestAdapter-*.vsix
name: VSIX installation package
- path: out\binaries\GoogleTestAdapter\$(configuration)\Packaging.GTA\GoogleTestAdapter.*.nupkg
name: NuGet package
#- path: OpenCover_Unit_CoverageData.xml
# name: OpenCover Unit coverage data
#- path: OpenCover_Integration_CoverageData.xml
# name: OpenCover Integration coverage data
deploy:
- provider: GitHub
auth_token:
secure: yRqT6kz8c9NZEuCUyBjKXvCLUNXcAc41F2Y4fa318ylBPaIcl38UNAK5Jt8MsNhs
description: $(RELEASE_NOTES)
draft: true
prerelease: true
on:
branch: master
appveyor_repo_tag: true
# - provider: NuGet
# api_key:
# secure: rx+/6IsV+rGqz6/fd3QD6nag41KxW+iGxMTq7Hm3cV03r/TRUub8R6xJA9TjW0mG
# skip_symbols: true
# on:
# branch: master
# appveyor_repo_tag: true