forked from fszlin/certes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
108 lines (90 loc) · 3.44 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
version: 2.0.2.{build}
build:
verbosity: minimal
project: Certes.sln
skip_tags: true
image: Visual Studio 2017
skip_commits:
files:
- '*.md'
#- '*.yml'
clone_depth: 1
nuget:
disable_publish_on_pr: true
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: 0
cache:
- dotnet-pre
- '%USERPROFILE%\.nuget\packages'
branches:
# whitelist
only:
- master
- preview
- beta
- release
init:
- git config --global core.autocrlf input
install:
- ps: wget https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1
- ps: .\dotnet-install.ps1 -InstallDir ./dotnet-pre -Version 2.1.300-preview1-008174 -NoPath
before_build:
- ps: New-Item build -Type directory -Force | Out-Null
# regular msbuild
- cmd: msbuild -t:restore -v:m
build_script:
- msbuild -p:DebugType=Full -v:m
- msbuild -t:src\Certes:pack -p:DebugType=Full -v:m
- msbuild -t:src\Certes_Cli:Publish -p:TargetFramework=netcoreapp1.0 -p:DebugType=Full -v:m
# dotnet tool
- ps: Copy-Item ./misc/NuGet-tool.config ./src/Certes.Cli/NuGet.config
- ps: $env:CERTES_PACKAGE_VERSION = (Get-ChildItem ./src/Certes/bin/$($env:CONFIGURATION)/*.nupkg | Select-Object -ExpandProperty Name).Replace('Certes.', '').Replace('.nupkg', '')
- ps: ./dotnet-pre/dotnet.exe pack src\Certes.Cli\Certes.Cli.csproj -c $($env:CONFIGURATION) -property:CertesVersion=$($env:CERTES_PACKAGE_VERSION)
# move packages
- ps: Get-ChildItem -Path "./src/**/*.nupkg" -Recurse | Move-Item -Destination "./build"
- ps: '"dotnet %~dp0dotnet-acme.dll %* " | Set-Content .\src\Certes.Cli\bin\$($env:CONFIGURATION)\netcoreapp1.0\publish\certes.bat'
- 7z a build\certes-cli.zip .\src\Certes.Cli\bin\%CONFIGURATION%\netcoreapp1.0\publish\*.* -r
#test: off
before_test:
test_script:
- ps: $openCover = "$($env:USERPROFILE)/.nuget/packages/opencover/4.6.519/tools/OpenCover.Console.exe"
- ps: cd test/Certes.Tests
- ps: >-
& $openCover "-register:user" "-target:dotnet.exe" "-targetargs:xunit -fxversion 2.0.0 -configuration Release -nobuild -maxthreads 4" "-oldstyle" "-output:./../../build/Certes.Tests.coverage.xml" "-filter:+[*]Certes.* -[*Tests*]*" "-hideskipped:All" "-returntargetcode"
- ps: cd ../../
- ps: cd test/Certes.Tests.Integration
- ps: >-
& $openCover "-register:user" "-target:dotnet.exe" "-targetargs:xunit -fxversion 2.0.0 -configuration Release -nobuild -maxthreads 4" "-oldstyle" "-output:./../../build/Certes.Tests.Integration.coverage.xml" "-filter:+[*]Certes.* -[*Tests*]*" "-hideskipped:All" "-returntargetcode"
- ps: cd ../../
after_test:
- npm install codecov -g -q
- codecov -f "./build/Certes.Tests.coverage.xml" -F unit > $null
- codecov -f "./build/Certes.Tests.Integration.coverage.xml" -F integration > $null
configuration: Release
artifacts:
- path: build/*.nupkg
name: nupkg
- path: build/certes-cli.zip
name: cli
deploy:
- provider: GitHub
release: v$(CERTES_PACKAGE_VERSION)
description: 'Certes v$(CERTES_PACKAGE_VERSION)'
auth_token:
secure: B+lTI7i/tnZeg1ZSmho3HvOWjs0C4hptNy5cvWgF0Nn7b6v8nwT/mxEWVCfIJ7Fy
artifact: nupkg,cli
draft: false
prerelease: false
on:
branch: release
- provider: NuGet
server: https://www.myget.org/F/certes/api/v2/package
api_key:
secure: RSdqUIwRSn8DI5xaa4iWBzOtYU6y3K9JRh07myQpAIRf5IhlwsZpFsnQOpCg1g7J
skip_symbols: true
symbol_server:
artifact: nupkg
on:
branch:
- master