Update appveyor.yml

This commit is contained in:
Michael Ganss
2019-05-15 14:13:57 +02:00
parent 945f2ae2a1
commit a20cf1ad83
4 changed files with 15 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
version: 4.0.{build}
version: 5.0.{build}
skip_tags: true
image: Visual Studio 2017
environment:
@@ -9,14 +9,13 @@ environment:
nuget:
disable_publish_on_pr: true
build_script:
- ps: (Get-Content src\HtmlSanitizer\HtmlSanitizer.csproj).Replace("1.0.0-VERSION", $env:APPVEYOR_BUILD_VERSION) | Set-Content src\HtmlSanitizer\HtmlSanitizer.csproj
- dotnet restore
- dotnet pack --include-symbols --include-source -c Release src\HtmlSanitizer
test_script:
- ps: |
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"mganss_HtmlSanitizer" /v:$env:APPVEYOR_BUILD_VERSION /d:sonar.organization="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.xml" /d:sonar.coverage.exclusions="**/Program.cs"
dotnet sonarscanner begin /k:"mganss_HtmlSanitizer" /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.xml" /d:sonar.coverage.exclusions="**/Program.cs"
dotnet build
}
- dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="..\..\coverage.xml" test\HtmlSanitizer.Tests\HtmlSanitizer.Tests.csproj -f netcoreapp2.0
@@ -24,7 +23,6 @@ test_script:
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
dotnet sonarscanner end /d:sonar.login="$env:sonar_token"
}
- "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- pip install codecov
- codecov -f "coverage.xml"
artifacts: