From 1e35804364fe64b3383e1005c341b89a40d54a9f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 16 Jul 2020 12:26:41 -0700 Subject: Make sure Ruby is setup Signed-off-by: Tim Smith --- .expeditor/run_windows_tests.ps1 | 23 +++++++++++++++++++++++ .expeditor/verify.pipeline.yml | 6 ++---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100755 .expeditor/run_windows_tests.ps1 diff --git a/.expeditor/run_windows_tests.ps1 b/.expeditor/run_windows_tests.ps1 new file mode 100755 index 0000000..8853397 --- /dev/null +++ b/.expeditor/run_windows_tests.ps1 @@ -0,0 +1,23 @@ +Write-Output "--- system details" +$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture' +Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize + +$ErrorActionPreference = 'Stop' + +Write-Output "--- Enable Ruby 2.7" +Write-Output "Add Uru to Environment PATH" +$env:PATH = "C:\Program Files (x86)\Uru;" + $env:PATH +[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) + +Write-Output "Register Installed Ruby Version 2.7 With Uru" +Start-Process "C:\Program Files (x86)\Uru\uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait +uru 271 +if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" } + +Write-Output "+++ bundle install" +bundle config --local path vendor/bundle +bundle install --jobs=7 --retry=3 + +Write-Output "+++ bundle exec rake spec" +bundle exec rake spec +if (-not $?) { throw "mixlib-shellout specs failing." } \ No newline at end of file diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 37a8529..2f834a1 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -44,10 +44,8 @@ steps: image: ruby:2.7-buster - label: run-specs-windows - command: - - bundle config --local path vendor/bundle - - bundle install --jobs=7 --retry=3 - - bundle exec rake + commands: + - .expeditor/run_windows_tests.ps1 expeditor: executor: windows: -- cgit v1.2.1