From 6e395a31ecf179a09e36ae1ba76d9a59befe8ad2 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 12:26:50 +0000 Subject: [PATCH 1/8] Add appveyor.yml --- .appveyor.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..f7631ea --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,11 @@ +environment: + matrix: + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + PowerShellEdition: PowerShellCore + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + PowerShellEdition: WindowsPowerShell + - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu + PowerShellEdition: PowerShellCore + +build_script: + - pwsh: ./tst/test.ps1 -CIBuild \ No newline at end of file From fea313af9910378abdadaf1f57efa02f852c2a30 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 12:33:16 +0000 Subject: [PATCH 2/8] add powershell core for windows matrix --- .appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index f7631ea..ce4e822 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,4 +8,5 @@ environment: PowerShellEdition: PowerShellCore build_script: - - pwsh: ./tst/test.ps1 -CIBuild \ No newline at end of file + - ps: if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) { ./tst/test.ps1 -CIBuild } + - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } \ No newline at end of file From b05b50722483ca1cb70800b7cda8d03fbe3522f5 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 12:40:38 +0000 Subject: [PATCH 3/8] upload test results to appveyor --- .appveyor.yml | 5 ++++- tst/test.ps1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ce4e822..7649685 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,4 +9,7 @@ environment: build_script: - ps: if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) { ./tst/test.ps1 -CIBuild } - - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } \ No newline at end of file + - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } + +on_finish: + -pwsh: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $pwd 'TestResults.xml')) \ No newline at end of file diff --git a/tst/test.ps1 b/tst/test.ps1 index 0e827da..7bf27dd 100644 --- a/tst/test.ps1 +++ b/tst/test.ps1 @@ -43,7 +43,7 @@ try { "Running all tests from: $path" if ($CIBuild) { - Invoke-Pester $path -EnableExit + Invoke-Pester $path -EnableExit -OutputFormat NUnitXml -OutputFile '..\TestResults.xml' } else { Invoke-Pester $path -Show Summary, Failed From 0d2e47483ba36ac9554f69cb6e48c569650ba68d Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 12:48:43 +0000 Subject: [PATCH 4/8] use test_script since test results upload did not work and errored in Linux --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7649685..6697d0d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,7 +7,7 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu PowerShellEdition: PowerShellCore -build_script: +test_script: - ps: if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) { ./tst/test.ps1 -CIBuild } - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } From 2e13d26642dbba75b2f4a132b02916df59669d9c Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 12:51:49 +0000 Subject: [PATCH 5/8] use different yaml syntax since appveyor does not like it --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6697d0d..c996267 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,9 +7,9 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu PowerShellEdition: PowerShellCore -test_script: +build_script: - ps: if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) { ./tst/test.ps1 -CIBuild } - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } -on_finish: +after_test: -pwsh: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $pwd 'TestResults.xml')) \ No newline at end of file From 151d8cd38d5dc6c6702255ca40f8a71e65b88673 Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 18:23:15 +0000 Subject: [PATCH 6/8] try something else and debug --- .appveyor.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c996267..6277082 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,6 +10,5 @@ environment: build_script: - ps: if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) { ./tst/test.ps1 -CIBuild } - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } - -after_test: - -pwsh: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $pwd 'TestResults.xml')) \ No newline at end of file + - pwsh: Test-Path (Join-Path $pwd 'TestResults.xml'); (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $pwd 'TestResults.xml')) + \ No newline at end of file From a39a11d08fbe0c8581c8b0bfda10224cb1edba2a Mon Sep 17 00:00:00 2001 From: Christoph Bergmeister Date: Thu, 13 Dec 2018 18:29:22 +0000 Subject: [PATCH 7/8] final cleanup, it works now --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6277082..ad78dc6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,14 +1,14 @@ environment: matrix: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - PowerShellEdition: PowerShellCore + PSEdition: Core - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - PowerShellEdition: WindowsPowerShell + PSEdition: Desktop - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu - PowerShellEdition: PowerShellCore + PSEdition: Core build_script: - - ps: if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) { ./tst/test.ps1 -CIBuild } - - pwsh: if ( $env:PowerShellEdition -eq 'PowerShellCore' ) { ./tst/test.ps1 -CIBuild } - - pwsh: Test-Path (Join-Path $pwd 'TestResults.xml'); (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $pwd 'TestResults.xml')) + - ps: if ( $env:PSEdition -eq 'Desktop' ) { ./tst/test.ps1 -CIBuild } + - pwsh: if ( $env:PSEdition -eq 'Core' ) { ./tst/test.ps1 -CIBuild } + - pwsh: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $PWD 'TestResults.xml')) \ No newline at end of file From 5adaa164471d1c6305a3e12122e91e3a827b8313 Mon Sep 17 00:00:00 2001 From: "Christoph Bergmeister [MVP]" Date: Fri, 14 Dec 2018 18:31:21 +0000 Subject: [PATCH 8/8] Remove Ubuntu image in matrix --- .appveyor.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ad78dc6..4a93cae 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,11 +4,9 @@ environment: PSEdition: Core - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 PSEdition: Desktop - - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu - PSEdition: Core build_script: - ps: if ( $env:PSEdition -eq 'Desktop' ) { ./tst/test.ps1 -CIBuild } - pwsh: if ( $env:PSEdition -eq 'Core' ) { ./tst/test.ps1 -CIBuild } - pwsh: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Join-Path $PWD 'TestResults.xml')) - \ No newline at end of file +