forked from csoltenborn/GoogleTestAdapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
81 lines (68 loc) · 3.99 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
version: 0.5.1.{build}
os: Previous Visual Studio 2015
configuration: Release
platform: Any CPU
environment:
COVERALLS_REPO_TOKEN:
secure: bFVGoXLR4/8VSClNH2s5qhXfJNwbJPbggNv6grvl+JaITuMkHLqvCw+48T0uKyFI
RELEASE_KEY_PASSWORD:
secure: 3+fpAMwxomiOZ5fzpb+3kjV4RvPSn0GRvFp71bZZs3QQr06zNU2Wvu4p77dmTKH+
install:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true") {
nuget install secure-file -ExcludeVersion
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:
- 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
nuget restore GoogleTestAdapter\GoogleTestAdapter.sln
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 ("GoogleTestAdapter\VsPackage\bin\" + $env:CONFIGURATION + "\GoogleTestAdapter.VsPackage.vsix")).ToString()
$targetFile = $([IO.FileInfo]$sourceFile).DirectoryName + "\GoogleTestAdapter-" + $version + ".vsix"
Copy-Item -Path $sourceFile -Destination $targetFile
test_script:
- ps: >-
$opencover = (Resolve-Path "GoogleTestAdapter/packages/OpenCover.*/tools/OpenCover.Console.exe").ToString()
$coveralls = (Resolve-Path "GoogleTestAdapter/packages/coveralls.net.*/tools/csmacnz.coveralls.exe").ToString()
& $opencover -register:user -target:VsTest.Console.exe "-targetargs:/Logger:Appveyor GoogleTestAdapter\DiaResolver.Tests\bin\$env:CONFIGURATION\GoogleTestAdapter.DiaResolver.Tests.dll GoogleTestAdapter\Core.Tests\bin\$env:CONFIGURATION\GoogleTestAdapter.Core.Tests.dll GoogleTestAdapter\TestAdapter.Tests\bin\$env:CONFIGURATION\GoogleTestAdapter.TestAdapter.Tests.dll" "-filter:+[*]* -[*Tests]* -[GoogleTestAdapter..VsPackage]*DialogPage -[GoogleTestAdapter.VsPackage]*TestExtensionOptionsPage -[GoogleTestAdapter.DiaResolver]*StubMemoryStream -[FluentAssertions*]*" -output:OpenCover_CoverageData.xml -returntargetcode
$TestExitCode = $LASTEXITCODE
& VsTest.Console GoogleTestAdapter\VsPackage.Tests\bin\$env:CONFIGURATION\GoogleTestAdapter.VsPackage.Tests.dll GoogleTestAdapter\VsPackage.Tests.Generated\bin\$env:CONFIGURATION\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 (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
# & $coveralls --opencover -i OpenCover_CoverageData.xml --repoToken $env:COVERALLS_REPO_TOKEN --commitId $env:APPVEYOR_REPO_COMMIT --commitBranch $env:APPVEYOR_REPO_BRANCH --commitAuthor $env:APPVEYOR_REPO_COMMIT_AUTHOR --commitEmail $env:APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL --commitMessage $env:APPVEYOR_REPO_COMMIT_MESSAGE --jobId $env:APPVEYOR_JOB_ID --serviceName AppVeyor
}
if ($TestExitCode -ne 0) {
exit $TestExitCode
}
artifacts:
- path: GoogleTestAdapter\VsPackage\bin\$(configuration)\GoogleTestAdapter-*.vsix
name: GoogleTestAdapter
- path: OpenCover_CoverageData.xml
name: OpenCover coverage data
deploy:
provider: GitHub
auth_token:
secure: yRqT6kz8c9NZEuCUyBjKXvCLUNXcAc41F2Y4fa318ylBPaIcl38UNAK5Jt8MsNhs
description: 'TODO provide release notes'
draft: true
prerelease: true
on:
branch: master
appveyor_repo_tag: true