1
1
2
2
version : ' {build}.0.0-dev'
3
- configuration : Release
4
- os : Visual Studio 2017
3
+ image : Ubuntu
5
4
pull_requests :
6
5
do_not_increment_build_number : true
7
6
8
- environment :
9
- nuget_apiKey :
10
- secure : jfcUvHZhgnUboplqTBDWr8mG5PIlrgBv5TA2fhhop4ZSiDxskyy+RtYyeHoduJFR
11
- myget_apiKey :
12
- secure : AguzfXNvHBkkDebTyWHK7o9OC5YL3eszT6u7PnzGq2G7ozdUypDlGGpcFsTRYHEc
13
- codecov_token :
14
- secure : UD/jw4jCH/TAuRNJWznzounpSWdObRskb3g8AKHK7f0gk5uD9ecAvJbiSp32a+LN
7
+
8
+ matrix :
9
+ fast_finish : true
10
+
11
+
12
+ configuration :
13
+ - Debug
14
+ - Release
15
+
15
16
16
17
# Override the 'version' if this is a GH-tag-commit -or- this is a custom branch (i.e not 'master').
17
18
init :
@@ -23,48 +24,72 @@ init:
23
24
}
24
25
iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/PureKrome/0f79e25693d574807939/raw/f5b40256fc2ca77d49f1c7773d28406152544c1e/appveyor-build-info.ps'))
25
26
27
+
26
28
before_build :
27
29
# Display .NET Core version
28
- - cmd : dotnet --info
29
- # Install Codecov prerequisite
30
- - choco install opencover.portable
31
- - choco install codecov
32
- # Display minimal restore text
33
- - cmd : dotnet restore --verbosity quiet
30
+ - ps : dotnet --info
31
+
34
32
35
33
build_script :
36
- - dotnet build -c %CONFIGURATION% -v minimal /p:Version=%APPVEYOR_BUILD_VERSION% /p:DebugType=full --no-restore
34
+ - ps : dotnet restore --verbosity quiet
35
+ - ps : dotnet build -c $env:CONFIGURATION -v minimal /p:Version=$env:APPVEYOR_BUILD_VERSION --no-restore
36
+
37
37
38
38
test_script :
39
- - OpenCover.Console.exe -register:user -target:"dotnet.exe" -targetargs:"test tests\OpenRealEstate.Transmorgrifiers.RealestateComAu.Tests -c %CONFIGURATION% -v minimal --no-restore --no-build " -filter:"+[OpenRealEstate.*]* -[OpenRealEstate.*.Tests]*" -output:".\coverage.xml" -oldstyle
39
+ - ps : |
40
+ if ($env:CONFIGURATION -eq 'Debug')
41
+ {
42
+ dotnet test -c $env:CONFIGURATION -v minimal --no-build --collect:"XPlat Code Coverage" --settings coverlet.runsettings --results-directory './CodeCoverageResults'
43
+ }
44
+ else
45
+ {
46
+ dotnet test -c $env:CONFIGURATION -v minimal --no-build
47
+ }
40
48
49
+
50
+ # We only:
51
+ # - Send DEBUG results up to codecov.
52
+ # - Pack for RELEASE only.
41
53
after_test :
42
- - codecov -f "coverage.xml" -t $(codecov_token)
43
- - dotnet pack -c %CONFIGURATION% /p:Version=%APPVEYOR_BUILD_VERSION% --no-restore --no-build
54
+ - ps : |
55
+ if ($env:CONFIGURATION -eq 'Debug')
56
+ {
57
+ # Currently, the bash script version is better than the .exe version.
58
+ Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
59
+ bash codecov.sh -s './CodeCoverageResults/' -f '*.xml' -Z
60
+ }
61
+
62
+ if ($env:CONFIGURATION -eq 'Release')
63
+ {
64
+ dotnet pack -c $env:CONFIGURATION --include-symbols -p:SymbolPackageFormat=snupkg /p:Version=$env:APPVEYOR_BUILD_VERSION --no-build
65
+ }
66
+
67
+
44
68
45
69
artifacts :
46
70
- path : ' **\*.nupkg'
47
- name : openrealestate-nugets
71
+ name : nuget-packages
72
+ type : NuGetPackage
73
+ - path : ' **\*.snupkg'
74
+ name : nuget-symbols
48
75
type : NuGetPackage
49
76
77
+
50
78
deploy :
51
79
- provider : NuGet
52
80
server : https://www.myget.org/F/openrealestate-net/api/v2/package
53
81
api_key :
54
82
secure : AguzfXNvHBkkDebTyWHK7o9OC5YL3eszT6u7PnzGq2G7ozdUypDlGGpcFsTRYHEc
55
- skip_symbols : true
56
- artifact : openrealestate-nugets
83
+ artifact : nuget-packages # myget does now support symbols BUT appveyor doesn't publish it correctly
57
84
on :
58
- appveyor_repo_tag : false
85
+ CONFIGURATION : Release
86
+ APPVEYOR_REPO_TAG : false
59
87
- provider : NuGet
60
88
server : https://www.myget.org/F/openrealestate/api/v2/package
61
89
api_key :
62
90
secure : AguzfXNvHBkkDebTyWHK7o9OC5YL3eszT6u7PnzGq2G7ozdUypDlGGpcFsTRYHEc
63
- skip_symbols : true
64
- artifact : openrealestate-nugets
91
+ artifact : nuget-packages # myget does now support symbols BUT appveyor doesn't publish it correctly
65
92
on :
66
- branch : master
67
- appveyor_repo_tag : true
68
-
69
- cache :
70
- - packages -> **\packages.config
93
+ CONFIGURATION : Release
94
+ APPVEYOR_REPO_BRANCH : master
95
+ APPVEYOR_REPO_TAG : true
0 commit comments