From 5ac9b1331267a94ccda7991e3a65bd092bd8de4c Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Wed, 23 Mar 2022 09:46:35 +0200 Subject: [PATCH 1/3] CI: run on windows Don't know if it works, let's try :-) 'windows-latest` currently means Windows Server 2022 (https://github.blog/changelog/2022-01-11-github-actions-jobs-running-on-windows-latest-are-now-running-on-windows-server-2022/) --- .github/workflows/actions.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 5a74326e..fa3a8cc4 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -16,7 +16,9 @@ jobs: matrix: ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', 'ruby-head', 'truffleruby-head' ] os_and_command: - - os: 'macos-latest' + - os: macos-latest + command: 'env TESTOPTS="--verbose" bundle exec rake test' + - os: windows-latest command: 'env TESTOPTS="--verbose" bundle exec rake test' - os: ubuntu-latest # Sometimes minitest starts and then just hangs printing nothing. From 0320e5ef6fa67f8fe2a6122db228069ec4c5dd59 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Sun, 24 Jul 2022 16:55:19 +0300 Subject: [PATCH 2/3] CI: rely on bundler installed by ruby/setup-ruby Hope this might fix "Error installing rake" errors. - https://github.com/ruby/setup-ruby#windows has some indications Windows needs particular versions of bundler to work well, and IIUC setup-ruby should already install bundler, so rely on that. - We do need rake but it's a kubeclient.gemspec dependency that `bundle install` should cover, avoid a global install with `gem`. --- .github/workflows/actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index fa3a8cc4..316d03c4 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -37,7 +37,6 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: false # disable running 'bundle install' and caching installed gems see https://github.com/httprb/http/issues/572 - - run: gem install rake bundler - run: bundle install - run: ${{ matrix.os_and_command.command }} timeout-minutes: 10 From 96be3795288bc54db6bff0316a0d69fbaab72999 Mon Sep 17 00:00:00 2001 From: Beni Cherniavsky-Paskin Date: Sun, 24 Jul 2022 17:43:34 +0300 Subject: [PATCH 3/3] Add tzinfo-data dev dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Needed on Windows: https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors tzinfo is required by (at least) openid_connect gem, which is an "optional" dependency for kubeclient — users are supposed to bring it themselves if they use 'oidc' auth — so making tzinfo-data a dev dependency. --- kubeclient.gemspec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kubeclient.gemspec b/kubeclient.gemspec index ef39da44..c404e2a1 100644 --- a/kubeclient.gemspec +++ b/kubeclient.gemspec @@ -32,6 +32,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency('mocha', '~> 1.5') spec.add_development_dependency 'openid_connect', '~> 1.1' spec.add_development_dependency 'net-smtp' + # needed on Windows, at least for openid_connect + spec.add_development_dependency 'tzinfo-data' spec.add_dependency 'jsonpath', '~> 1.0' spec.add_dependency 'rest-client', '~> 2.0'