Skip to content
  • Sponsor OpenRealEstate/OpenRealEstate.NET.Transmorgrifiers.RealestateComAu

  • Notifications You must be signed in to change notification settings
  • Fork 5

Commit 66f2d31

Browse files
committedApr 17, 2020
Modernize AppVeyor CI.
1 parent 5332f9d commit 66f2d31

File tree

85 files changed

+67
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+67
-30
lines changed
 

‎appveyor.yml

+55-30
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11

22
version: '{build}.0.0-dev'
3-
configuration: Release
4-
os: Visual Studio 2017
3+
image: Ubuntu
54
pull_requests:
65
do_not_increment_build_number: true
76

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+
1516

1617
# Override the 'version' if this is a GH-tag-commit -or- this is a custom branch (i.e not 'master').
1718
init:
@@ -23,48 +24,72 @@ init:
2324
}
2425
iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/PureKrome/0f79e25693d574807939/raw/f5b40256fc2ca77d49f1c7773d28406152544c1e/appveyor-build-info.ps'))
2526
27+
2628
before_build:
2729
# 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+
3432

3533
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+
3737

3838
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+
}
4048
49+
50+
# We only:
51+
# - Send DEBUG results up to codecov.
52+
# - Pack for RELEASE only.
4153
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+
4468
4569
artifacts:
4670
- path: '**\*.nupkg'
47-
name: openrealestate-nugets
71+
name: nuget-packages
72+
type: NuGetPackage
73+
- path: '**\*.snupkg'
74+
name: nuget-symbols
4875
type: NuGetPackage
4976

77+
5078
deploy:
5179
- provider: NuGet
5280
server: https://www.myget.org/F/openrealestate-net/api/v2/package
5381
api_key:
5482
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
5784
on:
58-
appveyor_repo_tag: false
85+
CONFIGURATION: Release
86+
APPVEYOR_REPO_TAG: false
5987
- provider: NuGet
6088
server: https://www.myget.org/F/openrealestate/api/v2/package
6189
api_key:
6290
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
6592
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

‎coverlet.runsettings

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<RunSettings>
3+
<DataCollectionRunSettings>
4+
<DataCollectors>
5+
<DataCollector friendlyName="XPlat code coverage">
6+
<Configuration>
7+
<Exclude>[*.Tests]*,</Exclude> <!-- [Assembly-Filter]Type-Filter -->
8+
</Configuration>
9+
</DataCollector>
10+
</DataCollectors>
11+
</DataCollectionRunSettings>
12+
</RunSettings>

0 commit comments

Comments
 (0)
Please sign in to comment.