-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
58 lines (53 loc) · 2.51 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
version: 10.0.{build}
image: Visual Studio 2017
configuration: Release
environment:
COVERALLS_REPO_TOKEN:
secure: L8tfbEtqAYUDh2tw6GEn8DaRwLIhZ13yiTr43vVG+mp2Fz3/VNvmu4kOOIoikDOR
install:
- ps: >-
cd src
nuget restore Zio.sln
$env:ZIO_BUILD_NUMBER = ([int]$env:APPVEYOR_BUILD_NUMBER).ToString("000")
$env:ZIO_VERSION_SUFFIX = "pre$env:ZIO_BUILD_NUMBER"
$env:appveyor_nuget_push = 'false'
if(-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
if($env:appveyor_repo_tag -eq 'True') {
if($env:appveyor_repo_tag_name -match '^v[0-9]') {
$env:appveyor_nuget_push = 'true'
$env:ZIO_VERSION_SUFFIX = ""
}
if($env:appveyor_repo_tag_name -eq 'latest') {
$env:appveyor_nuget_push = 'true'
}
}
}
build:
project: src/Zio.sln
verbosity: minimal
before_package:
- cmd: msbuild /t:pack /p:VersionSuffix="%ZIO_VERSION_SUFFIX%" /p:Configuration=Release Zio/Zio.csproj
artifacts:
- path: src\Zio\Bin\Release\*.nupkg
name: Zio Nugets
test_script:
- cd Zio.Tests
- dotnet xunit -configuration Release -parallel none -serialize -maxthreads 1 -verbose
after_test:
- ps: >-
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
mkdir "$env:APPVEYOR_BUILD_FOLDER\tools"
nuget install -OutputDirectory "$env:APPVEYOR_BUILD_FOLDER\tools" OpenCover -version 4.6.519
nuget install -OutputDirectory "$env:APPVEYOR_BUILD_FOLDER\tools" coveralls.net -version 0.8.0-beta0001
..\..\tools\OpenCover.4.6.519\tools\OpenCover.Console.exe -register:user -returntargetcode -target:"dotnet.exe" -targetdir:"$env:APPVEYOR_BUILD_FOLDER\src\Zio.Tests" -targetargs:"xunit -configuration Release -parallel none -serialize -maxthreads 1 -verbose" -filter:"+[Zio*]*-[Zio.Tests*]*" -output:"./coverage.xml" -mergeoutput -oldstyle
$has_result = Test-Path "./coverage.xml"
if ($? -and $has_result) {
..\..\tools\coveralls.net.0.8.0-beta0001\tools\csmacnz.Coveralls.exe --opencover --repoToken $env:COVERALLS_REPO_TOKEN --basePath "$env:APPVEYOR_BUILD_FOLDER" -i "./coverage.xml" --useRelativePath --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_BUILD_NUMBER --serviceName appveyor
}
}
deploy:
- provider: NuGet
api_key:
secure: 7cthHh+wYWZjhqxaxR6QObRaRnstvFkQOY7MkxIsC5kpQEBlKZXuinf0IybbYxJt
on:
appveyor_nuget_push: true