forked from morelinq/MoreLINQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
71 lines (63 loc) · 2.02 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
version: '{build}'
image: Visual Studio 2019
skip_commits:
files:
- '*.md'
- '*.txt'
- '.editorconfig'
- lic/*
environment:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
install:
- ps: Install-Product node 6
- 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: tools\dotnet-install.ps1 -JSonFile global.json
before_build:
- dotnet --info
build_script:
- ps: >-
grep --extended-regexp '^[[:space:]]*using[[:space:]]+System\.Linq;' (dir MoreLinq.Test\*Test.cs)
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)
cmd /c call pack.cmd 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
- ps: dotnet reportgenerator -reports:MoreLinq.Test/coverage.netcoreapp3.1.opencover.xml -targetdir:tmp/cover -tag:(git show -q --pretty=%H)
- ps: Get-ChildItem tmp/cover | Compress-Archive -DestinationPath coverage-report.zip
- cmd: |
cd tmp\cover
tar -cvz -f ../../coverage-report.tar.gz *
artifacts:
- path: dist\*.nupkg
- path: coverage-report.*
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