Skip to content

Commit

Permalink
added ruby 3.0/3.1 windows/linux image
Browse files Browse the repository at this point in the history
Signed-off-by: nikhil2611 <[email protected]>
  • Loading branch information
nikhil2611 committed Apr 21, 2022
1 parent c67ba18 commit 5849b46
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 9 deletions.
16 changes: 16 additions & 0 deletions .expeditor/run_windows_tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Stop script execution when a non-terminating error occurs
$ErrorActionPreference = "Stop"
# This will run ruby test on windows platform

Write-Output "--- Bundle install"
bundle config set --local without docs debug
bundle config set --local path vendor/bundle
If ($lastexitcode -ne 0) { Exit $lastexitcode }

bundle install --jobs=7 --retry=3
If ($lastexitcode -ne 0) { Exit $lastexitcode }

Write-Output "--- Bundle Execute"

bundle exec rake spec
If ($lastexitcode -ne 0) { Exit $lastexitcode }
53 changes: 46 additions & 7 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,61 @@ expeditor:
timeout_in_minutes: 30

steps:

- label: run-specs-ruby-2.7
command:
- .expeditor/run_linux_tests.sh "rake spec"
expeditor:
executor:
docker:
image: ruby:2.7-buster
image: ruby:2.7

- label: run-specs-ruby-3.0
command:
- .expeditor/run_linux_tests.sh "rake spec"
expeditor:
executor:
docker:
image: ruby:3.0

- label: run-specs-ruby-3.1
command:
- .expeditor/run_linux_tests.sh "rake spec"
expeditor:
executor:
docker:
image: ruby:3.1


- label: run-specs-ruby-2.7-windows
command:
- .expeditor/run_windows_tests.ps1
expeditor:
executor:
docker:
host_os: windows
shell: ["powershell", "-Command"]
image: rubydistros/windows-2019:2.7
user: 'NT AUTHORITY\SYSTEM'

- label: run-specs-ruby-3.0-windows
command:
- .expeditor/run_windows_tests.ps1
expeditor:
executor:
docker:
host_os: windows
shell: ["powershell", "-Command"]
image: rubydistros/windows-2019:3.0
user: 'NT AUTHORITY\SYSTEM'

- label: run-specs-windows
- label: run-specs-ruby-3.1-windows
command:
- bundle config set --local without docs debug
- bundle config set --local path vendor/bundle
- bundle install --jobs=7 --retry=3
- bundle exec rake spec
- .expeditor/run_windows_tests.ps1
expeditor:
executor:
docker:
host_os: windows
image: rubydistros/windows-2019:2.7
shell: ["powershell", "-Command"]
image: rubydistros/windows-2019:3.1
user: 'NT AUTHORITY\SYSTEM'
5 changes: 3 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ require "bundler/gem_tasks"
begin
require "rspec/core/rake_task"

RSpec::Core::RakeTask.new do |t|
t.pattern = "spec/**/*_spec.rb"
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = false
t.pattern = FileList["spec/**/*_spec.rb"]
end
rescue LoadError
desc "rspec is not installed, this task is disabled"
Expand Down

0 comments on commit 5849b46

Please sign in to comment.