From 561ffa6b8e309af0737588ac502e7c3dc8376a45 Mon Sep 17 00:00:00 2001 From: Jorge Santos Date: Mon, 28 Dec 2020 10:57:10 +0800 Subject: [PATCH 1/4] Ruby 3.0 Support & CI Actions improvement - Relax Ruby version constraint with `'>= 2.4', '< 3.1'`; - CI now runs with multiple versions of Ruby, using a matrix strategy; - Currently runs on 2.6, 2.7 and 3.0 (previously was only running on 2.6) - Replaced the `bundle install` step with `bundler-cache: true` - As shown on https://github.com/ruby/setup-ruby#caching-bundle-install-automatically --- .github/workflows/ruby.yml | 10 ++++++---- .travis.yml | 1 + codecov.gemspec | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 6f9c43b..bc6b64d 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -5,14 +5,16 @@ on: [push, pull_request] jobs: test: runs-on: ubuntu-latest - + strategy: + matrix: + ruby: [ '2.6', '2.7', '3.0' ] steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 - - name: Install dependencies - run: bundle install + ruby-version: ${{ matrix.ruby }} + # Runs 'bundle install' and caches installed gems automatically + bundler-cache: true - name: Run tests run: bundle exec rake diff --git a/.travis.yml b/.travis.yml index 0edcbf5..16d616d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,5 +8,6 @@ rvm: - 2.5 - 2.6 - 2.7 + - 3.0 - jruby - jruby-9.2 diff --git a/codecov.gemspec b/codecov.gemspec index 946cce4..9ea0de1 100644 --- a/codecov.gemspec +++ b/codecov.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/codecov/codecov-ruby' s.license = 'MIT' s.platform = Gem::Platform::RUBY - s.required_ruby_version = '~> 2.4' + s.required_ruby_version = '>= 2.4', '< 3.1' s.version = ::Codecov::VERSION s.add_dependency 'simplecov', '>= 0.15', '< 0.21' From a43d39eae177a7a689d984e2ada854db48111491 Mon Sep 17 00:00:00 2001 From: Jorge Oliveira Santos Date: Mon, 28 Dec 2020 21:21:56 +0800 Subject: [PATCH 2/4] Include all versions declared as supported on the strategy matrix Co-authored-by: Alexander Popov --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index bc6b64d..298d56f 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.6', '2.7', '3.0' ] + ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ] steps: - uses: actions/checkout@v2 - name: Set up Ruby From e070fcc822e3da8de84d447b91ea24aa7a24a202 Mon Sep 17 00:00:00 2001 From: Jorge Oliveira Santos Date: Mon, 28 Dec 2020 21:22:38 +0800 Subject: [PATCH 3/4] Use '>= 2.4', '< 4' as the required ruby version Co-authored-by: Alexander Popov --- codecov.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.gemspec b/codecov.gemspec index 9ea0de1..b674e94 100644 --- a/codecov.gemspec +++ b/codecov.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.homepage = 'https://github.com/codecov/codecov-ruby' s.license = 'MIT' s.platform = Gem::Platform::RUBY - s.required_ruby_version = '>= 2.4', '< 3.1' + s.required_ruby_version = '>= 2.4', '< 4' s.version = ::Codecov::VERSION s.add_dependency 'simplecov', '>= 0.15', '< 0.21' From 2013b36d5403a6f161aac4d8e2e71e78ac2a4677 Mon Sep 17 00:00:00 2001 From: Tom Hu Date: Thu, 14 Jan 2021 16:24:08 -0500 Subject: [PATCH 4/4] Update .github/workflows/ruby.yml Co-authored-by: Alexander Popov --- .github/workflows/ruby.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 298d56f..4d7ee6f 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,7 +7,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ] + ruby: + - 2.4 + - 2.5 + - 2.6 + - 2.7 + - 3.0 steps: - uses: actions/checkout@v2 - name: Set up Ruby