Skip to content

Commit

Permalink
Merge pull request #84 from chef/IPACK-101-chef-mixlib-cli-operationa…
Browse files Browse the repository at this point in the history
…lize-ruby-3-0-3-1-in-verify-pipeline

add ruby tests 3.0 and 3.1 in verify pipeline
  • Loading branch information
PrajaktaPurohit authored Apr 7, 2022
2 parents 2f7712d + 1ec0308 commit e5a01d7
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 17 deletions.
17 changes: 17 additions & 0 deletions .expeditor/run_windows_tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 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 --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
If ($lastexitcode -ne 0) { Exit $lastexitcode }
40 changes: 26 additions & 14 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,55 @@ expeditor:

steps:

- label: run-lint-and-specs-ruby-2.4
- label: run-lint-and-specs-ruby-2.6
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
image: ruby:2.4-buster

- label: run-lint-and-specs-ruby-2.5
image: ruby:2.6
- label: run-lint-and-specs-ruby-2.7
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
image: ruby:2.5-buster
image: ruby:2.7

- label: run-lint-and-specs-ruby-2.6
- label: run-lint-and-specs-ruby-3.0
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
image: ruby:2.6-buster
- label: run-lint-and-specs-ruby-2.7
image: ruby:3.0

- label: run-lint-and-specs-ruby-3.1
command:
- .expeditor/run_linux_tests.sh rake
expeditor:
executor:
docker:
image: ruby:2.7-buster
image: ruby:3.1

- label: run-specs-ruby-3.0-windows
commands:
- .expeditor/run_windows_tests.ps1

expeditor:
executor:
docker:
host_os: windows
shell: ["powershell"]
image: rubydistros/windows-2019:3.0

- label: run-specs-ruby-3.1-windows
commands:
- .expeditor/run_windows_tests.ps1

- label: run-specs-windows
command:
- bundle config set --local without docs debug
- bundle install --jobs=7 --retry=3
- bundle exec rake
expeditor:
executor:
docker:
host_os: windows
shell: ["powershell"]
image: rubydistros/windows-2019:3.1
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Order is important. The last matching pattern has the most precedence.

* @chef/chef-foundation-owners @chef/chef-foundation-approvers @chef/chef-foundation-reviewers
.expeditor/ @chef/jex-team
* @chef/chef-infra-reviewers @chef/chef-infra-approvers @chef/chef-infra-owners
.expeditor/ @chef/infra-packages
*.md @chef/docs-team
2 changes: 1 addition & 1 deletion mixlib-cli.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.email = "[email protected]"
s.homepage = "https://github.com/chef/mixlib-cli"
s.license = "Apache-2.0"
s.required_ruby_version = ">= 2.4"
s.required_ruby_version = ">= 2.6"

s.require_path = "lib"
s.files = %w{LICENSE NOTICE} + Dir.glob("lib/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
Expand Down
1 change: 1 addition & 0 deletions spec/mixlib/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ class T2 < TestCLI
class T3 < TestCLI
option :arg2, boolean: true
end

class T4 < T3
option :arg3, boolean: true
end
Expand Down

0 comments on commit e5a01d7

Please sign in to comment.