-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathappveyor.yml
45 lines (45 loc) · 1.99 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
version: 3.4-{build}
branches:
except:
- l10n_develop
skip_tags: true
skip_commits:
# Skip commits where all of the files modified are docs
files:
- docs/*
- '**/*.html'
- '**/*.md'
image:
- Visual Studio 2017
configuration: Release
nuget:
project_feed: true
before_build:
- cmd: nuget restore
build:
project: EDDI.sln # path to Visual Studio solution or project
parallel: true
verbosity: minimal
test_script:
# This powershell script may be run locally from your EDDI repo installation folder.
# The OpenCover file path must be updated if the OpenCover package version is updated
# The VSTest target file path must be updated if the CI is building using something other than Visual Studios 2017 Community Edition
- ps: |
$openCoverConsole = '.\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe'
$openCoverReg = '-register:user'
$openCoverArgs = '-mergebyhash -skipautoprops -excludebyattribute:*.ExcludeFromCodeCoverage*,*.GeneratedCodeAttribute* -excludebyfile:*\*.Designer.cs,*.xaml -filter:"+[Eddi*]* +[Utilities*]* +[Tests*]UnitTests*"'
$target = '-target:"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"'
$targetArgs = '-targetargs:"bin\Release\Tests.dll' + $(If ($APPVEYOR) {' /logger:Appveyor'}) + ' /tests:UnitTests /Parallel /InIsolation /Blame"'
New-Item -ItemType directory -Path '.\TestResults' -Force
$resultsPath = '.\TestResults\coverage.xml'
$output = '-output:' + $resultsPath
$runCoverageCmd = "$openCoverConsole $openCoverArgs $openCoverReg $target $targetArgs $output"
ECHO $runCoverageCmd
IEX $runCoverageCmd
after_test:
# Our CodeCov token is "c0cc9048-1cdc-464b-b2fa-dac79464e1c4"
- ps: |
cd TestResults
$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f coverage.xml -t c0cc9048-1cdc-464b-b2fa-dac79464e1c4