-
Notifications
You must be signed in to change notification settings - Fork 32
/
appveyor.yml
66 lines (64 loc) · 3.06 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
version: 5.0.0.{build} # Only change for mayor versions (e.g. 6.0.0)
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
matrix:
- job_name: windows
appveyor_build_worker_image: Visual Studio 2022
- job_name: linux
appveyor_build_worker_image: Ubuntu
matrix:
fast_finish: true
only_commits:
files:
- appveyor.yml
- Src/**/*
for:
-
matrix:
only:
- job_name: windows
init:
# default is: core.autocrlf input
- git config --global core.autocrlf true
build_script:
- ps: cd $env:APPVEYOR_BUILD_FOLDER\Src
- ps: dotnet --version
- ps: dotnet restore --verbosity quiet
- ps: dotnet add .\MailMergeLib.Tests\MailMergeLib.Tests.csproj package AltCover
- ps: |
$version = "5.12.3"
$versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$version = $version + "-PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
}
dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /p:IncludeSymbols=true /p:ContinuousIntegrationBuild=true /p:Version=$version /p:FileVersion=$versionFile
dotnet pack MailMergeLib.sln --verbosity minimal --no-build --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=$env:APPVEYOR_BUILD_FOLDER/artifacts /p:ContinuousIntegrationBuild=true
test_script:
- cmd: nuget install Appveyor.TestLogger
- cmd: dotnet test --framework net6.0 --test-adapter-path:. --logger:Appveyor MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="..\MailMergeLib\MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true"
- cmd: nuget install codecov -excludeversion
- cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\MailMergeLib.Tests\coverage.net6.0.xml" -n net6.0win
artifacts:
- path: 'artifacts\*.nupkg'
type: NuGetPackage
- path: 'artifacts\*.snupkg'
type: NuGetPackage
deploy:
- provider: NuGet
api_key:
secure: 13kUCox0wcWli/7l5mHQXDV5QhYG7e4QXoNaYvSS6TQ2K6KPyUoLE2K92wY4xA5b
on:
branch: main
-
matrix:
only:
- job_name: linux
build_script:
- cd $APPVEYOR_BUILD_FOLDER/Src
- dotnet --version
- dotnet restore --verbosity quiet
- dotnet add ./MailMergeLib.Tests/MailMergeLib.Tests.csproj package AltCover
- dotnet build MailMergeLib.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618
test_script:
- dotnet test --framework net6.0 MailMergeLib.sln /p:configuration=release /p:AltCover=true /p:AltCoverXmlReport="coverage.xml" /p:AltCover=true /p:AltCoverStrongNameKey="../MailMergeLib/MailMergeLib.snk" /p:AltCoverAssemblyExcludeFilter="MailMergeLib.Tests|NUnit3.TestAdapter" /p:AltCoverLineCover="true"
- bash <(curl -s https://codecov.io/bash) -f ./MailMergeLib.Tests/coverage.net6.0.xml -n net6.0linux