Appveyor build improvements
Appveyor build improvements: - added nuget packages folder to cache to speedup build - all unit tests are now showing up in the tests tab
This commit is contained in:
Родитель
dd3464baf7
Коммит
ff298d0811
12
appveyor.yml
12
appveyor.yml
|
@ -17,6 +17,8 @@ skip_tags: true
|
|||
#---------------------------------#
|
||||
# environment configuration #
|
||||
#---------------------------------#
|
||||
cache:
|
||||
- packages
|
||||
|
||||
# scripts that are called at very beginning, before repo cloning
|
||||
init:
|
||||
|
@ -62,14 +64,14 @@ after_build:
|
|||
#---------------------------------#
|
||||
# tests configuration #
|
||||
#---------------------------------#
|
||||
before_test:
|
||||
- dotnet test .\BenchmarkDotNet.Tests\project.json --configuration Release
|
||||
- dotnet test .\BenchmarkDotNet.IntegrationTests\project.json --configuration Release
|
||||
test_script:
|
||||
- dotnet test .\BenchmarkDotNet.Tests\project.json --configuration Release -xml tests-results01.xml
|
||||
- ps: .\build\uploadtests.ps1 "tests-results01.xml"
|
||||
- dotnet test .\BenchmarkDotNet.IntegrationTests\project.json --configuration Release -xml tests-results02.xml
|
||||
- ps: .\build\uploadtests.ps1 "tests-results02.xml"
|
||||
|
||||
test:
|
||||
assemblies:
|
||||
- BenchmarkDotNet.Tests\bin\$(configuration)\net451\win7-x64\BenchmarkDotNet.Tests.dll
|
||||
- BenchmarkDotNet.IntegrationTests\bin\$(configuration)\net451\win7-x64\BenchmarkDotNet.IntegrationTests.dll
|
||||
- BenchmarkDotNet.IntegrationTests.Classic\bin\$(configuration)\BenchmarkDotNet.IntegrationTests.Classic.exe
|
||||
|
||||
artifacts:
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
param(
|
||||
[string]
|
||||
$ResultsFile,
|
||||
|
||||
[string]
|
||||
$ResultsType = "xunit"
|
||||
)
|
||||
|
||||
$ResultsFile = Resolve-Path $ResultsFile
|
||||
$Url = "https://ci.appveyor.com/api/testresults/$ResultsType/$($env:APPVEYOR_JOB_ID)"
|
||||
|
||||
if(-Not (Test-Path $ResultsFile))
|
||||
{
|
||||
Write-Host "File '$ResultsFile' not found"
|
||||
exit(1)
|
||||
}
|
||||
|
||||
# upload results to AppVeyor
|
||||
try
|
||||
{
|
||||
$wc = New-Object 'System.Net.WebClient'
|
||||
$wc.UploadFile($Url, $ResultsFile)
|
||||
Write-Host "Tests result uploaded correctly"
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "Error uploading tests results to $Url"
|
||||
$Exception = $_.Exception
|
||||
|
||||
while($null -ne $Exception)
|
||||
{
|
||||
Write-Host "Error: $($Exception.Message)"
|
||||
$Exception = $Exception.InnerException
|
||||
}
|
||||
|
||||
exit(2)
|
||||
}
|
Загрузка…
Ссылка в новой задаче