From ffc66e3354e7551b3fc0f7d2cc9e192df46ee104 Mon Sep 17 00:00:00 2001 From: Joakim Antman Date: Tue, 4 Jan 2022 22:48:32 +0200 Subject: [PATCH] Bring back Ruby 2.5 support and CodeClimate coverage reports --- .github/workflows/test.yml | 25 +++++++++++++++++++++++-- .rubocop.yml | 2 +- ruby-jwt.gemspec | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4542bcee..918dd045 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: "2.6" + ruby-version: "2.7" bundler-cache: true - name: Run RuboCop run: bundle exec rubocop @@ -26,6 +26,7 @@ jobs: fail-fast: false matrix: ruby: + - 2.5 - 2.6 - 2.7 - "3.0" @@ -37,7 +38,6 @@ jobs: experimental: [false] include: - ruby: 2.7 - coverage: "true" gemfile: 'gemfiles/rbnacl.gemfile' - ruby: "ruby-head" experimental: true @@ -64,3 +64,24 @@ jobs: - name: Run tests run: bundle exec rspec + coverage: + needs: [ test ] + name: coverage + runs-on: ubuntu-20.04 + env: + BUNDLE_GEMFILE: 'gemfiles/rbnacl.gemfile' + CC_TEST_REPORTER_ID: e87b175db123ab42ca2ca4420abaa13c0dc2085608402b9a25f08a83ca3ba202 + steps: + - uses: actions/checkout@v2 + - name: Install libsodium + run: | + sudo apt-get update -q + sudo apt-get install libsodium-dev -y + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.7" + bundler-cache: true + - uses: paambaati/codeclimate-action@v3.0.0 + with: + coverageCommand: bundle exec rspec diff --git a/.rubocop.yml b/.rubocop.yml index 6487e4b8..6c4769fa 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,7 +1,7 @@ inherit_from: .rubocop_todo.yml AllCops: - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.5 NewCops: enable SuggestExtensions: false Exclude: diff --git a/ruby-jwt.gemspec b/ruby-jwt.gemspec index 20923cb3..0cdc99a2 100644 --- a/ruby-jwt.gemspec +++ b/ruby-jwt.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.description = 'A pure ruby implementation of the RFC 7519 OAuth JSON Web Token (JWT) standard.' spec.homepage = 'https://github.com/jwt/ruby-jwt' spec.license = 'MIT' - spec.required_ruby_version = '>= 2.6' + spec.required_ruby_version = '>= 2.5' spec.metadata = { 'bug_tracker_uri' => 'https://github.com/jwt/ruby-jwt/issues', 'changelog_uri' => "https://github.com/jwt/ruby-jwt/blob/v#{JWT.gem_version}/CHANGELOG.md"