From 5862e18ee54565bba0870e2485d32d2f9b4e7d9e Mon Sep 17 00:00:00 2001 From: skeshari12 Date: Thu, 24 Mar 2022 16:14:43 +0530 Subject: [PATCH] Add ruby 3.0 and 3.1 tests Signed-off-by: skeshari12 --- .expeditor/run_windows_tests.ps1 | 17 +++++++++ .expeditor/verify.pipeline.yml | 23 +++++++++--- .github/CODEOWNERS | 5 ++- appveyor.yml | 63 -------------------------------- 4 files changed, 38 insertions(+), 70 deletions(-) create mode 100644 .expeditor/run_windows_tests.ps1 delete mode 100644 appveyor.yml diff --git a/.expeditor/run_windows_tests.ps1 b/.expeditor/run_windows_tests.ps1 new file mode 100644 index 0000000..f048b32 --- /dev/null +++ b/.expeditor/run_windows_tests.ps1 @@ -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 } \ No newline at end of file diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 3bab4a4..88c57b3 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -8,12 +8,25 @@ expeditor: timeout_in_minutes: 30 steps: -- label: "run specs :windows:" - command: - - bundle config set --local without docs debug - - bundle install --jobs=7 --retry=3 - - bundle exec rake spec + +- label: run-specs-ruby-3.0-windows + commands: + - .expeditor/run_windows_tests.ps1 + + expeditor: + executor: + docker: + host_os: windows + shell: ["powershell", "-Command"] + image: rubydistros/windows-2019:3.0 + +- label: run-specs-ruby-3.1-windows + commands: + - .expeditor/run_windows_tests.ps1 + expeditor: executor: docker: host_os: windows + shell: ["powershell", "-Command"] + image: rubydistros/windows-2019:3.1 \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c372f98..35fa8be 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,4 +1,5 @@ # Order is important. The last matching pattern has the most precedence. -* @chef/msys-developers -.expeditor/** @chef/jex-team +* @chef/chef-infra-reviewers @chef/chef-infra-approvers @chef/chef-infra-owners +.expeditor/** @chef/infra-packages +*.md @chef/docs-team \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 6dbaa61..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,63 +0,0 @@ -version: "master-{build}" - -os: Visual Studio 2017 -platform: - - x64 - -cache: - - vendor/bundle - -configuration: - - unit - -environment: - matrix: - - ruby_version: "25-x64" - - ruby_version: "24-x64" - - ruby_version: "23-x64" - -clone_folder: c:\projects\win32-service -clone_depth: 1 - -skip_commits: - # version bumps by Expeditor happen as a separate commit after the merge, we can skip - message: /Bump version to [0-9.]+ by Chef Expeditor/ - # if ONLY the files listed below are changed in a commit, skip - files: - - MAINTAINERS.md - - MAINTAINERS.toml - - CHANGELOG.md - - RELEASE_NOTES.md - -skip_tags: true -branches: - only: - - master - -install: - - systeminfo - - winrm quickconfig -q - - SET PATH=C:\Ruby%ruby_version%\bin;%PATH% - - echo %PATH% - - appveyor DownloadFile http://curl.haxx.se/ca/cacert.pem -FileName C:\cacert.pem - - set SSL_CERT_FILE=C:\cacert.pem - - SET BUNDLE_WITHOUT=server:docgen:maintenance:pry:travis:integration:ci - - bundle config --local path vendor/bundle # use the cache we define above - - bundle install || bundle install || bundle install - - SET SPEC_OPTS=--format progress - -build: off - -before_test: - - ruby --version - - gem --version - - bundler --version - - bundle env - -for: - - - matrix: - only: - - configuration: unit - build_script: - - bundle exec rake spec:unit