Skip to content

Commit 9b8be29

Browse files
authored
Run appveyor test with NUnit 3.9 (#109)
1 parent dbe2eda commit 9b8be29

2 files changed

Lines changed: 3 additions & 28 deletions

File tree

Build/BuildScripts/CodeJam.AppVeyor.NUnit.Tests.ps1

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mkdir "$env:APPVEYOR_BUILD_FOLDER\_Results" -ErrorAction SilentlyContinue
55
$wc = New-Object System.Net.WebClient
66

77
#run .net tests
8-
$targetsDotNet = "net48;net472;net471;net47;net461;net45;net40" -split ";"
8+
$targetsDotNet = "net48;net472;net471;net47;net461;net45;net40;net35;net20" -split ";"
99
foreach ($target in $targetsDotNet) {
1010
$logFileName = "$env:APPVEYOR_BUILD_FOLDER\_Results\$($target)_nunit_results.xml"
1111
$testAssemblies = (gci -include $include -r | `
@@ -26,29 +26,6 @@ foreach ($target in $targetsDotNet) {
2626
}
2727
}
2828

29-
#run .net 2.x tests
30-
$targetsDotNet = "net35;net20" -split ";"
31-
foreach ($target in $targetsDotNet) {
32-
$logFileName = "$env:APPVEYOR_BUILD_FOLDER\_Results\$($target)_nunit_results.xml"
33-
$testAssemblies = (gci -include $include -r | `
34-
where { $_.fullname -match "\\bin\\Release\\$($target)" } | `
35-
select -ExpandProperty FullName)
36-
37-
echo ""
38-
echo "=== $target ==="
39-
# HACK: see https://github.com/appveyor/ci/issues/3412 for details
40-
echo "nunit3-console $testAssemblies --result=$logFileName" "--framework=net-4.0"
41-
&"nunit3-console" $testAssemblies "--result=$logFileName" "--framework=net-4.0"
42-
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
43-
44-
echo "UploadFile: https://ci.appveyor.com/api/testresults/nunit3/$env:APPVEYOR_JOB_ID from $logFileName"
45-
$wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit3/$env:APPVEYOR_JOB_ID", "$logFileName")
46-
if ($LastExitCode -ne 0) {
47-
echo "FAIL: UploadFile: https://ci.appveyor.com/api/testresults/nunit3/$env:APPVEYOR_JOB_ID from $logFileName"
48-
$host.SetShouldExit($LastExitCode)
49-
}
50-
}
51-
5229
#run .net core tests
5330
$targetsDotNetCore = "netcoreapp3.0;netcoreapp2.1;netcoreapp1.1" -split ";"
5431
foreach ($target in $targetsDotNetCore) {

appveyor.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ version: '3.0.{build}'
88

99
init:
1010
- cmd: git config --global core.autocrlf true
11+
# install NUnit 3.9 (see https://github.com/appveyor/ci/issues/3412 for explanation)
12+
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/build-images/21d2405c7a91118b53484d9605061329b88d81c5/scripts/Windows/install_nunit3.ps1'))
1113
#- ps: $env:buildVersion = "$env:packageVersion.$env:appveyor_build_number"
1214
#- ps: $env:nugetVersion = "$env:packageVersion-alpha$env:appveyor_build_number"
1315
#- ps: $env:perfTestsBuildVersion = "$env:perfTestsPackageVersion.$env:appveyor_build_number"
@@ -33,10 +35,6 @@ nuget:
3335
account_feed: false
3436
project_feed: false
3537

36-
#before_build:
37-
#- ps: .\Build\CodeJam.AppVeyor.FixVersionProps.ps1 -path Build\CodeJam.Default.props -buildVersion $env:buildVersion -nugetVersion $env:nugetVersion
38-
#- ps: .\Build\CodeJam.AppVeyor.FixVersionProps.ps1 -path Build\CodeJam.PerfTests.Default.props -buildVersion $env:perfTestsBuildVersion -nugetVersion $env:perfTestsNugetVersion
39-
4038
#build:
4139
# project: CodeJam.sln
4240
# publish_nuget: false

0 commit comments

Comments
 (0)