From d1b9a6aad61d44d1721bd764418473b3cacb3d9b Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 24 Jun 2021 08:53:15 -0400 Subject: [PATCH 1/3] Add support for ruby 3, drop support for older rubies Rubies below 2.6 are EOL, 2.6 only supports security releases so this change drops support for older rubies in the gemspec and adds CI support for 3.0.x. --- .github/workflows/ci.yml | 2 +- yajl-ruby.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc78031..7643a0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: test: strategy: matrix: - ruby_version: [2.6.x, 2.7.x] + ruby_version: [2.6.x, 2.7.x, 3.0.x] fail-fast: false runs-on: ubuntu-latest name: Test on Ruby ${{ matrix.ruby_version }} diff --git a/yajl-ruby.gemspec b/yajl-ruby.gemspec index 53cb2f4..50ca7a4 100644 --- a/yajl-ruby.gemspec +++ b/yajl-ruby.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |s| s.rubygems_version = %q{1.4.2} s.summary = %q{Ruby C bindings to the excellent Yajl JSON stream-based parser library.} s.test_files = `git ls-files spec examples`.split("\n") - s.required_ruby_version = ">= 2.3.0" + s.required_ruby_version = ">= 2.6.0" # tests s.add_development_dependency 'rake-compiler' From bc3aa15a13466b25c0c9d16f5bcb5d9d65381500 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 24 Jun 2021 09:14:08 -0400 Subject: [PATCH 2/3] Add gem build and install steps to CI I think this is a Ruby 3.0 issue...locally I had to build and install the gem for the spec/parsing/large_number_spec.rb tests to pass. They were failing to find `yajl` in the `require` call. I reproduced this in the console as well. I believe this has to do with changes to bundler in Ruby 3.0 but I'm not 100% sure. --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7643a0b..cdf0caf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,5 +18,9 @@ jobs: ruby-version: ${{ matrix.ruby_version }} - name: Install dependencies run: bundle install + - name: Build gem + run: gem build yajl-ruby.gemspec + - name: Install gem + run: gem install yajl-ruby - name: Run tests run: bundle exec rake spec From ca5d62383b974ae77baaa406a36765179f826b83 Mon Sep 17 00:00:00 2001 From: eileencodes Date: Thu, 24 Jun 2021 09:25:31 -0400 Subject: [PATCH 3/3] Make sure actions runs on PRs I think we need both, otherwise it will only run on changes pushed to upstream rather than on forks that open PRs. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdf0caf..ebfb87b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push] +on: [push, pull_request] jobs: test: