-
Notifications
You must be signed in to change notification settings - Fork 414
/
appveyor.yml
101 lines (93 loc) · 2.98 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: '{build}'
image:
- Visual Studio 2019
- Ubuntu1604
- macos
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
for:
-
matrix:
only:
- image: Visual Studio 2019
environment:
IMAGE_NAME: win
deploy:
- provider: NuGet
server: https://www.myget.org/F/morelinq/api/v2/package
api_key:
secure: fhGwXyO35FSshRzs5GWmF1LJTrd1sIqmS/jNCSfO2LfOciuYAKiXuFMYZFGiTAl+
symbol_server: https://www.myget.org/F/morelinq/symbols/api/v2/package
on:
branch: deploy
notifications:
- provider: Email
to:
on_build_success: true
on_build_failure: true
on_build_status_changed: false
-
matrix:
only:
- image: Ubuntu1604
environment:
IMAGE_NAME: ubuntu-16.04
-
matrix:
only:
- image: macos
environment:
IMAGE_NAME: macos
skip_commits:
files:
- '*.md'
- '*.txt'
- '.editorconfig'
- lic/*
install:
- npm install -g eclint
- git rm .editorconfig
- eclint check -n "**/*.{cs,tt,cmd,sh,md,txt,yml}"
- eclint check -w "**/*.{cs,tt,cmd,sh,md,txt,yml,json,sln,csproj,shfbproj}"
- git reset --hard
- ps: if ($isWindows) { tools\dotnet-install.ps1 -JSonFile global.json }
- ps: if ($isWindows) { tools\dotnet-install.ps1 -Runtime dotnet -Version 3.1.10 -SkipNonVersionedFiles }
- ps: if ($isWindows) { tools\dotnet-install.ps1 -Runtime dotnet -Version 2.1.23 -SkipNonVersionedFiles }
- sh: ./tools/dotnet-install.sh --jsonfile global.json
- sh: ./tools/dotnet-install.sh --runtime dotnet --version 3.1.10 --skip-non-versioned-files
- sh: ./tools/dotnet-install.sh --runtime dotnet --version 2.1.23 --skip-non-versioned-files
- sh: export PATH="~/.dotnet:$PATH"
before_build:
- dotnet --info
build_script:
- ps: >-
grep --extended-regexp '^[[:space:]]*using[[:space:]]+System\.Linq;' (dir -Recurse -File -Filter *Test.cs MoreLinq.Test)
if ($LASTEXITCODE -eq 0) {
throw 'Unit tests should not import System.Linq'
}
$id = $env:APPVEYOR_REPO_COMMIT_TIMESTAMP -replace '([-:]|\.0+Z)', ''
$id = $id.Substring(0, 13)
if ($isWindows) { cmd /c call pack.cmd ci-$id } else { ./pack.sh ci-$id }
if ($LASTEXITCODE -ne 0) {
throw "Building/Packing failed with an exit code of $LASTEXITCODE."
}
$diff = git diff --ignore-all-space --exit-code 2>&1
$diff | % { if ($_ -is [string]) { $_ } else { [string]$_ } } | echo
if ($LASTEXITCODE -ne 0) {
throw "New code was generated during build that's not been committed."
}
test_script:
- cmd: test.cmd
- sh: ./test.sh
- ps: dotnet reportgenerator -reports:MoreLinq.Test/coverage.net5.0.opencover.xml -targetdir:tmp/cover -tag:(git show -q --pretty=%H)
- ps: |
cd tmp/cover
tar -cz -f "../../coverage-report-${IMAGE_NAME}.tar.gz" *
- sh: curl -sSL https://codecov.io/bash > codecov
- sh: chmod +x codecov
- sh: if [ "$CI_LINUX" = "true" ]; then ./codecov -f ./MoreLinq.Test/coverage.net5.0.opencover.xml; fi
artifacts:
- path: dist\*.nupkg
- path: coverage-report-*