forked from petrsvihlik/WopiHost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
47 lines (29 loc) · 1.33 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
image: Visual Studio 2017
configuration: Release
skip_commits:
files:
- '*.md'
init:
- git config --global core.autocrlf true
# For debugging purposes (RDP)
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
install:
- nuget sources add -Name wopi -Source %nuget_feed%
- cinst opencover.portable
- cinst codecov
build:
verbosity: normal
before_build:
- ps: dotnet restore
test: off
test_script:
- ps: >-
ForEach ($folder in (Get-ChildItem -Path .\ -Directory -Filter *.Tests)) {
$project = Get-ChildItem -Path ($folder.FullName+"\*.csproj") | Select-Object -First 1
$logger = ("--logger:trx;LogFileName=" + $folder.FullName + "\xunit-results.xml")
dotnet test $project.FullName $logger
$openCover = 'C:\ProgramData\chocolatey\lib\opencover.portable\tools\OpenCover.Console.exe'
$targetArgs = '-targetargs: test ' + $project.FullName + ' ' + $folder.FullName + ' -c ' + $ENV:CONFIGURATION + ' ' + $logger
$filter = '-filter:+[Wopi*]*-[*Tests]*'
& $openCover '-target:C:\Program Files\dotnet\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' ('-output:' + $ENV:APPVEYOR_BUILD_FOLDER + '\coverage.xml')
}