-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathappveyor.yml
73 lines (68 loc) · 2.53 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
environment:
build_version: 5.0.0
Version: $(build_version)
op_build_user: "ipjohnson"
op_build_user_email: "[email protected]"
access_token:
secure: vCRC/3M0+oha9ayrLw0InjkRodm+DwoHAXyifCORdU6HlfE9NzNXdOw1J4zhXsw3
codecov_token:
secure: QR0uOQBaDnL/Cbp2l46/KAIVftXshfopHfvrn4z4ePF/IFJW05lOX2BOHyuwIqDa
version: $(build_version)-{build}
configuration: Release
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '$(build_version).0'
assembly_file_version: '$(build_version).{build}'
assembly_informational_version: '$(build_version)'
before_build:
- ps: |
nuget restore EasyRpc.sln
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
CD documentation
git checkout $env:APPVEYOR_REPO_BRANCH -q
choco install docfx -y
# choco install nuget.commandline -y
CD ..
}
build:
project: EasyRpc.sln
publish_nuget: true
verbosity: minimal
test_script:
- ps: |
dotnet test "./tests/EasyRpc.Tests/EasyRpc.Tests.csproj" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:Include="[EasyRpc.*]*" /p:Exclude="[*Test]*"
after_test:
- ps: |
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "./tests/EasyRpc.Tests/coverage.cobertura.xml" -U "-s" -A "-s" -t $env:codecov_token
after_build:
- ps: |
if(-Not $env:APPVEYOR_PULL_REQUEST_TITLE)
{
CD documentation
# & nuget install docfx.console -Version 2.18.4 -Source https://www.myget.org/F/docfx/api/v3/index.json
# & docfx.console.2.18.4\tools\docfx docfx.json
& docfx docfx.json
if ($lastexitcode -ne 0){
throw [System.Exception] "docfx build failed with exit code $lastexitcode."
}
git config --global credential.helper store
Add-Content -Path "$HOME\.git-credentials" -Value "https://$($env:access_token):[email protected]`n" -NoNewline
git config --global user.email $env:op_build_user_email
git config --global user.name $env:op_build_user
git clone https://github.com/ipjohnson/EasyRpc.git -b gh-pages origin_site -q
Copy-Item origin_site/.git _site -recurse
CD _site
git add -A 2>&1
git commit -m "CI Updates" -q
git push origin gh-pages -q
CD ../..
}
artifacts:
- path: EasyRpc*.nupkg
name: EasyRpc
image:
- Visual Studio 2019