-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
68 lines (56 loc) · 2.49 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
version: 2.0.0.{build}
image: Visual Studio 2019
configuration:
- WIN8-Release
- WIN10-Release
platform: Any CPU
skip_branch_with_pr: true
environment:
sonarcloud_token:
secure: WSZCNtuf3h9M4BxNiFQ7SQPwGkg3+LqSMZRyfYruiicYvc1BzYaN90n8pNEsPAKs
snk_passphrase:
secure: Wl4NefzdMAo7GP7gP11aWDrxKoQPC0eN78TZFcZBbHGMW3geBDFu40RVF1GxTFUaFzN/lAcQ3qL9m8huHSWLBg==
snk_salt:
secure: tIuRlNokDRTBkah55IRfeATr4WWOEfQOLDqUjrDMMcPEmgq4yOTHzQFKEky67G9rk51D2VvdMFsTcDQrecDonA==
init:
- cmd: nuget sources add -name "myget.org" -source "https://www.myget.org/F/winnster/api/v3/index.json"
install:
- cmd: choco install opencover
- ps: set-alias opencover "${env:LocalAppData}\Apps\OpenCover\OpenCover.Console.exe"
- cmd: choco install sonarscanner-msbuild-net46
- ps: iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- ps: set-alias securefile ".\appveyor-tools\secure-file.exe"
dotnet_csproj:
patch: true
file: '**\DotRas.csproj'
version: '2.0.0'
package_version: '2.0.0-preview-{build}'
informational_version: '{version}'
nuget:
disable_publish_on_pr: true
before_build:
- cmd: appveyor-tools\secure-file.exe -decrypt Winnster.snk.enc -secret %snk_passphrase% -salt %snk_salt%
- cmd: SonarScanner.MSBuild.exe begin /k:"DotRas" /v:"2.0.0-preview-%APPVEYOR_BUILD_NUMBER%" /d:"sonar.branch.name=%APPVEYOR_REPO_BRANCH%" /d:"sonar.host.url=https://sonarcloud.io" /o:"winnster" /d:"sonar.login=%sonarcloud_token%" /d:"sonar.analysis.configuration=%configuration%" /d:"sonar.cs.nunit.reportsPaths=**/TestResult.xml" /d:"sonar.cs.opencover.reportsPaths=**/opencover.xml" /d:"sonar.exclusions=**\examples\**,**\Interop\**,**\Primitives\**,**\tools\**"
- cmd: nuget restore
build:
verbosity: minimal
test_script:
- ps: opencover -target:"C:\Tools\NUnit3\nunit3-console.exe" -targetargs:"$(get-childitem *.tests.dll -recurse | where { $_.FullName -notmatch 'obj' } | %{ `"$_`" }) --skipnontestassemblies" -register -output:opencover.xml
after_test:
- cmd: SonarScanner.MSBuild.exe end /d:"sonar.login=%sonarcloud_token%"
artifacts:
- path: '**\*.nupkg'
name: NuGet
- path: '**\TestResult.xml'
name: Test Results
- path: '**\opencover.xml'
name: Coverage Results
deploy:
provider: NuGet
server: https://www.myget.org/F/winnster/api/v2/package
api_key:
secure: j1UnxyPBIzKNE91vJAVHOdoAumEAruRWZYres7ahOLY99HcGHtztXDu+ckZ6g6Mr
skip_symbols: true
artifact: /.*\.nupkg/
on:
branch: master