From 73d57dd119032e6d203bd339cb3f9a475f6051e4 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Mon, 15 Jan 2024 17:47:47 +0900 Subject: [PATCH 1/2] Add GitHub Actions to run CI - CRuby versions tested are based on the Travis CI setting https://github.com/nahi/httpclient/blob/master/.travis.yml - JRuby and TruffleRuby have not been added yet until all CI against CRuby are green - Failures/errors are expected against these Ruby versions: Ruby 2.5 raises `simplecov-rcov` and `erb` raises `no implicit conversion of Hash into Integer (TypeError)` Ruby 3.1 and higher raises OpenSSL related errors Ruby 3.4.0 dev needs to add base64 gem because it is a bundled gem since Ruby 3.4, that will be taken care of by adding it to rubyntlm --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..e999967 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: test + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', 'head'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run tests + run: bundle exec rake --trace From c06d1e8adf85fc9566c1a70f0c3e82567590b779 Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Mon, 29 Jan 2024 20:53:39 +0900 Subject: [PATCH 2/2] Remove `simplecov` and `simplecov-rcov` tentatively to see if this argument error while `Fetching simplecov-rcov 0.3.5` is addressed: https://github.com/yahonda/httpclient/actions/runs/7695505773/job/20968521867#step:3:72 ``` ArgumentError: wrong number of arguments (given 4, expected 1) /home/runner/work/httpclient/httpclient/vendor/bundle/ruby/2.5.0/gems/psych-5.1.2/lib/psych.rb:322:in `safe_load' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/safe_yaml.rb:31:in `safe_load' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:496:in `block (2 levels) in read_checksums' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:495:in `wrap' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:495:in `block in read_checksums' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package/tar_reader.rb:116:in `seek' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:494:in `read_checksums' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:547:in `block (2 levels) in verify' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package/tar_reader.rb:29:in `new' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:546:in `block in verify' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package/file_source.rb:30:in `open' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package/file_source.rb:30:in `with_read_io' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:545:in `verify' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/2.5.0/rubygems/package.rb:526:in `spec' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/rubygems_gem_installer.rb:95:in `spec' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/source/rubygems.rb:190:in `install' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/installer/gem_installer.rb:54:in `install' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/installer/parallel_installer.rb:186:in `do_install' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/worker.rb:62:in `apply_func' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/worker.rb:57:in `block in process_queue' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/worker.rb:54:in `loop' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/worker.rb:54:in `process_queue' /opt/hostedtoolcache/Ruby/2.5.9/x64/lib/ruby/gems/2.5.0/gems/bundler-2.3.27/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads' ``` --- Gemfile | 2 -- test/helper.rb | 7 ------- 2 files changed, 9 deletions(-) diff --git a/Gemfile b/Gemfile index 3d75a30..5515109 100644 --- a/Gemfile +++ b/Gemfile @@ -10,8 +10,6 @@ group :development do gem 'rake', :require => false gem 'rdoc' gem 'test-unit' - gem 'simplecov' - gem 'simplecov-rcov' gem 'pry' gem 'rack', '~> 2.2' gem 'rubysspi' diff --git a/test/helper.rb b/test/helper.rb index 26bc4f9..5b3fe16 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -1,11 +1,4 @@ # -*- encoding: utf-8 -*- -begin - require 'simplecov' - require 'simplecov-rcov' - SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter - SimpleCov.start -rescue LoadError -end require 'test/unit' require 'httpclient'