-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathappveyor.yml
59 lines (58 loc) · 2.24 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
version: '4.0.{build}'
image: 'Visual Studio 2022'
init:
-
cmd: 'git config --global core.autocrlf true'
install:
- 'nuget restore'
- 'dotnet restore'
- 'choco install codecov'
before_build:
- 'nuget restore'
# We let choco to install the latest version of codecov;
# therefore, to correctly set the path to the folder of
# the installed version, the following is what this script
# does:
# 1- Search the installation path of codecov for every version
# (using the `Get-ChildItem1).
# 2- Append build path (i.e., `/build/netstandard1.0/CodeCoverage`)
# to the codecov to every item in the list returned in (1), AND
# separate every item in the list using ';' delimiter.
# 3- Append the generated directories to `PATH`.
#
# An alternative to this approach would be to pin the version
# codecov so its build path is always set to the pinned version.
- {ps: "$env:PATH = @($env:PATH) + [string]::join(\"\\build\\netstandard1.0\\CodeCoverage\\;\", (Get-ChildItem -LiteralPath \"C:\\Users\\appveyor\\.nuget\\packages\\microsoft.codecoverage\\\" -Directory -Recurse).fullname)"}
build:
verbosity: minimal
clone_depth: 1
test_script:
-
cmd: 'dotnet restore Core.Tests\Core.Tests.csproj --verbosity m'
-
cmd: 'dotnet test Core.Tests\Core.Tests.csproj --collect "Code coverage" --results-directory:.'
- {ps: "$coverage_file = dir -path . -filter *.coverage -recurse | %{$_.FullName -replace \"\\\\\", \"/\"}"}
- {ps: "CodeCoverage.exe analyze /output:coverage.xml $coverage_file"}
# on_finish: any clean up code here
deploy: off
for:
-
branches:
only: [main]
configuration: Release
build_script:
- 'MSBuild.exe /t:Rebuild'
after_test:
- {ps: "codecov.exe -f coverage.xml"}
artifacts:
- {path: 'Core/bin/Release/Genometric.MSPC.Core*.nupkg', name: MSPC}
deploy:
provider: NuGet
api_key: {secure: R9BDT6tjyjrRf/SNqhrjz3Bju8vUGEZ05qG6UAIF7Zmam2Wk8wjZgDMVyzRvY8Ae}
skip_symbols: false
-
branches:
only: ['/dev*/']
configuration: Debug
after_test:
- {ps: "codecov.exe -f coverage.xml"}