Skip to content

Commit

Permalink
Move testing into custom script
Browse files Browse the repository at this point in the history
Appveyor doesn't fully support XUnit on .NET Core yet; see appveyor/ci#1404
  • Loading branch information
Tomas Lycken committed Oct 3, 2017
1 parent e98cf87 commit 643ec09
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
bin
obj
packages
test_results

.vs
.vscode
6 changes: 2 additions & 4 deletions appveyor.yml
Expand Up @@ -23,10 +23,8 @@ before_build:
build_script:
- dotnet build src --configuration Release
- dotnet pack src --configuration Release --no-build
test:
assemblies:
only:
- '**\*.Tests.dll'
test_script:
- ps: Get-ChildItem src\*.Tests | select -ExpandProperty Name | % { dotnet test "src\\$_" -c Release --no-build --logger trx --results}
artifacts:
- path: src/**/*.nupkg
deploy:
Expand Down
11 changes: 11 additions & 0 deletions run-tests.ps1
@@ -0,0 +1,11 @@
Get-ChildItem src\*.Tests `
| select -ExpandProperty Name `
| % { dotnet test "src\\$_" -c Release --no-build --logger foo --results-directory (Join-Path $(pwd) test_results) }

$wc = New-Object 'System.Net.WebClient'

if ($env:APPVEYOR) {
Get-ChildItem test_results `
| select -ExpandProperty FullName `
| % { $wc.UploadFile("https://ci.appveyor.com/api/testresults/xunit/$($env:APPVEYOR_JOB_ID)", "$_") }
}
2 changes: 2 additions & 0 deletions src/RdbmsEventStore.sln
Expand Up @@ -11,6 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
..\appveyor.yml = ..\appveyor.yml
..\deploy-nugets.ps1 = ..\deploy-nugets.ps1
..\get-version.ps1 = ..\get-version.ps1
..\GitVersion.yml = ..\GitVersion.yml
..\LICENSE.md = ..\LICENSE.md
..\README.md = ..\README.md
Expand Down

0 comments on commit 643ec09

Please sign in to comment.