-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
appveyor.yml
72 lines (68 loc) · 3.34 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
version: 3.0.0.{build} # Only change for mayor versions (e.g. 4.0.0)
skip_commits:
files:
- '**/*.md'
- '.github/**/*'
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: Ubuntu2204
matrix:
fast_finish: true
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 SmartFormat.sln --verbosity quiet
- ps: dotnet add .\SmartFormat.Tests\SmartFormat.Tests.csproj package AltCover
- ps: |
$version = "3.5.1"
$versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
$version = $version + "-PR" + $env:APPVEYOR_PULL_REQUEST_NUMBER
}
dotnet build SmartFormat.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618 /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:ContinuousIntegrationBuild=true /p:Version=$version /p:FileVersion=$versionFile
# Only pack for the main project, exclude forks
if ($env:APPVEYOR_PROJECT_SLUG -eq 'smartformat') {
dotnet pack SmartFormat.Deploy.sln --verbosity minimal --configuration release /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg /p:PackageOutputPath=../../artifacts /p:ContinuousIntegrationBuild=true /p:Version=$version /p:FileVersion=$versionFile
}
test_script:
- cmd: nuget install Appveyor.TestLogger
- cmd: dotnet test SmartFormat.sln --framework net6.0 --test-adapter-path:. --logger:Appveyor /p:configuration=release /p:AltCover=true /p:AltCoverStrongNameKey="..\SmartFormat.snk" /p:AltCoverAssemblyExcludeFilter="SmartFormat.Tests|NUnit3.TestAdapter" /p:AltCoverAttributeFilter="ExcludeFromCodeCoverage" /p:AltCoverLineCover="true"
- cmd: nuget install codecov -excludeversion
- cmd: .\Codecov\Tools\win7-x86\codecov.exe -f ".\SmartFormat.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 sln SmartFormat.sln remove ./Demo/Demo.csproj
- dotnet restore SmartFormat.sln --verbosity quiet
- dotnet add ./SmartFormat.Tests/SmartFormat.Tests.csproj package AltCover
- dotnet build SmartFormat.sln /verbosity:minimal /t:rebuild /p:configuration=release /nowarn:CS1591,CS0618
test_script:
- dotnet test SmartFormat.sln --no-build --framework net6.0 /p:configuration=release /p:AltCover=true /p:AltCoverStrongNameKey="../SmartFormat.snk" /p:AltCoverAssemblyExcludeFilter="SmartFormat.Tests|NUnit3.TestAdapter" /p:AltCoverAttributeFilter="ExcludeFromCodeCoverage" /p:AltCoverLineCover="true"
- bash <(curl -s https://codecov.io/bash) -f ./SmartFormat.Tests/coverage.net6.0.xml -n net6.0linux