forked from Dynatrace/openkit-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
88 lines (77 loc) · 2.79 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: 1.0.1.{build}
# environment variables
environment:
COVERALLS_REPO_TOKEN:
secure: IH0irnGyWP3Z9jcxBz6LsnYIH2pStkwq23/tMRWFCFswYfTA5DvVPTp4pbz9r0Hi
# Build with Visual Studio 2017
image: Visual Studio 2017
# Build Release and Coverage (2 build jobs)
configuration:
- Release
- Coverage
# fail fast (No need to build Failing Release & Coverage builds)
matrix:
fast_finish: true
# Assembly patching for .NET and .NET Core projects
assembly_info:
patch: true
file: '**\AssemblyInfo.*'
assembly_version: $(appveyor_build_version)
assembly_file_version: $(appveyor_build_version)
assembly_informational_version: $(appveyor_build_version)
dotnet_csproj:
patch: true
file: '**\openkit-dotnetcore-*.csproj'
version: $(appveyor_build_version)
package_version: $(appveyor_build_version)
assembly_version: $(appveyor_build_version)
file_version: $(appveyor_build_version)
informational_version: $(appveyor_build_version)
# restore NuGet packages
before_build:
- cmd: nuget restore
# build
build:
project: openkit-dotnet.sln
verbosity: minimal
# run tests with code coverage only for Coverage configuration
for:
-
matrix:
only:
- configuration: Coverage
test_script:
- ps: |
# Run .NET test assemblies, excluding .NET Core
$testAssemblies = Get-ChildItem -Recurse -Include openkit-dotnetfull-*Tests.dll | ? {$_.FullName -match "\\bin\\Coverage\\" } | % FullName
packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"packages\NUnit.ConsoleRunner.3.8.0\tools\nunit3-console.exe" -targetargs:"'--result=myresults.xml;format=AppVeyor' $testAssemblies" -register:user -filter:"+[*]* -[*.Tests]*" -output:coverage.xml
# Run .NET Core tests
$testProjects = Get-ChildItem -Recurse -Include openkit-dotnetcore-*Tests.csproj | % FullName
foreach ($project in $testProjects)
{
packages\OpenCover.4.6.519\tools\OpenCover.Console.exe -target:"dotnet.exe" -targetargs:"test -c Coverage $project --no-build" -register:user -filter:"+[*]* -[*.Tests]*" -oldstyle -output:coverage.xml -mergeoutput
}
after_test:
- ps: |
if ("$Env:APPVEYOR_PULL_REQUEST_NUMBER" -eq "")
{
packages\coveralls.io.1.4.2\tools\coveralls.net.exe --opencover .\coverage.xml -r $Env:COVERALLS_REPO_TOKEN
}
# artifacts being published
artifacts:
- path: src\**\bin\Release\*.dll
name: netfull
- path: src\**\bin\Release\**\*.dll
name: netcore
# deployment
deploy:
- provider: GitHub
release: $(APPVEYOR_REPO_TAG_NAME)
auth_token:
secure: SMt+UW9Ruxn51BbZho/uvBEHmWaJ7fFFpmu0p/HTZaFdCD9z87xleqf4XgRmM6qn
repository: Dynatrace/openkit-dotnet
prerelease: false
on:
branch: master
configuration: Release
APPVEYOR_REPO_TAG: true