forked from mganss/ExcelMapper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
40 lines (40 loc) · 1.8 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
version: 5.1.{build}
skip_tags: true
image: Visual Studio 2019
environment:
access_token:
secure: Eq6BjtZ80BXKLwFMg76IjuQAvbLjbojIF/X/ARouGVhxPneJtgDfCXMPNgJ7KBKq
sonar_token:
secure: W7pHKhuTW6Lh8WlXJNTOIaOzeuxLi+H6Nqmnm4pr28jM6jyIpOZ+1r10lIQi0eCA
JAVA_HOME: C:\Program Files\Java\jdk14
nuget:
disable_publish_on_pr: true
build_script:
- dotnet restore
- dotnet pack --include-symbols --include-source -c Release ExcelMapper
test_script:
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"mganss_ExcelMapper" /v:$env:APPVEYOR_BUILD_VERSION /o:"mganss-github" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="$env:sonar_token" /d:sonar.cs.opencover.reportsPaths="$($env:APPVEYOR_BUILD_FOLDER)\coverage.netcoreapp2.2.xml" /d:sonar.coverage.exclusions="**/Program.cs"
dotnet build
}
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="..\coverage.xml" ExcelMapper.Tests\ExcelMapper.Tests.csproj /p:Include="[ExcelMapper]*"
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
dotnet sonarscanner end /d:sonar.login="$env:sonar_token"
}
- pip install codecov
- codecov -f "coverage.netcoreapp2.2.xml"
artifacts:
- path: 'ExcelMapper\**\*.*nupkg'
on_success:
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
git config --global credential.helper store
Add-Content -Path "$HOME\.git-credentials" -Value "https://$($env:access_token):[email protected]`n" -NoNewline
git config --global user.email "[email protected]"
git config --global user.name "Michael Ganss"
git tag v$env:APPVEYOR_BUILD_VERSION
git push origin --tags --porcelain
}