-
Notifications
You must be signed in to change notification settings - Fork 10
/
appveyor.yml
43 lines (39 loc) · 2.45 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
version: 1.5.{build}
skip_tags: true
configuration: Release
clone_folder: C:\Projects\MRTD.NET\
cache:
- packages -> **\packages.config
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}'
environment:
COVERALLS_REPO_TOKEN:
secure: XWiL6LEQaVhFTVjsb0NUG37Zdv5uenF7aKl0Vhkre446M8zElJKfqL8R+RuvLGlp
before_build:
- nuget restore ".\MRTD.NET.sln"
build:
project: .\MRTD.NET.sln
publish_nuget: true
verbosity: minimal
test_script:
- ps: >-
.\packages\OpenCover.*\tools\OpenCover.Console.exe -register:user -target:nunit3-console.exe "-targetargs:""SmartCardApi\bin\$env:CONFIGURATION\SmartCardApi.dll" "DemoApp\bin\$env:CONFIGURATION\DemoApp.dll"" " -filter:"+[SmartCardApi*]*" -output:opencoverCoverage.xml
$coveralls = (Resolve-Path "packages/coveralls.net.*/tools/csmacnz.Coveralls.exe").ToString()
$env:APPVEYOR_BUILD_NUMBER
& $coveralls --opencover -i opencoverCoverage.xml --repoToken $env:COVERALLS_REPO_TOKEN --useRelativePaths --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
before_package:
- ps: "$projectName = \"SmartCardApi\"\n\n$csprojPathTemplate = \".\\PROJECT_NAME\\PROJECT_NAME.csproj\"\n$csprojPath = $csprojPathTemplate -replace \"PROJECT_NAME\", $projectName\n\nfunction replaceSymbolsInFile($regex, $path) \n{ \n (Get-Content $path) -replace $regex,'' | out-file $path -encoding utf8\n}\n\n$testCSFilesRegex = '<Compile Include=\"(\\S+\\.(test|Fk)\\.cs)\" />'\nreplaceSymbolsInFile $testCSFilesRegex $csprojPath\n\n$pakageNames = @(\n \"Nunit\",\n \"OpenCover\",\n \"coveralls.net\"\n)\n$packagesConfigPath = \".\\\" + $projectName + \"\\packages.config\"\nForeach($packageName in $pakageNames) {\n $packagesRegexTemplate = '<package id=\"PACKAGE_NAME\"(.{1,})'\n $packagesRegex = $packagesRegexTemplate -replace \"PACKAGE_NAME\", $packageName\n replaceSymbolsInFile $packagesRegex $packagesConfigPath\n}"
deploy:
- provider: NuGet
api_key:
secure: wDCNNKlK1++DShgVeMDQEyVtIu4GqTCTiMHgLXCRf9u7PWZCo3N531zyLMLxKo8n
skip_symbols: true
notifications:
- provider: GitHubPullRequest
on_build_success: true
on_build_failure: true
on_build_status_changed: true