Skip to content

Commit

Permalink
Merge pull request #26 from mjankowski/ruby-eol-ci
Browse files Browse the repository at this point in the history
Drop EOL ruby versions
  • Loading branch information
searls authored Jun 17, 2024
2 parents fd49ffc + cca25a5 commit 7c948b5
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
ruby-version: [2.7, '3.0', 3.1, 3.2]
ruby-version:
- '3.0'
- '3.1'
- '3.2'
- '3.3'

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: false # <-- Can reenable this after dropping 2.7
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run tests for Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
Expand Down
6 changes: 1 addition & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,4 @@ gem "rake"
gem "minitest"
gem "standard"
gem "m"

# Remove branch after 2.7 is dropped
if RUBY_VERSION > "3"
gem "mocktail"
end
gem "mocktail"
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ GEM
rake (>= 0.9.2.2)
method_source (1.0.0)
minitest (5.19.0)
mocktail (2.0.0)
sorbet-eraser (~> 0.3.1)
sorbet-runtime (~> 0.5.9204)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
Expand All @@ -43,6 +46,8 @@ GEM
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
sorbet-eraser (0.3.1)
sorbet-runtime (0.5.11435)
standard (1.33.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
Expand All @@ -62,6 +67,7 @@ PLATFORMS
DEPENDENCIES
m
minitest
mocktail
rake
standard
standard-performance!
Expand Down
2 changes: 1 addition & 1 deletion standard-performance.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
spec.summary = "Standard Ruby Plugin providing configuration for rubocop-performance"
spec.homepage = "https://github.com/standardrb/standard-performance"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.7.0"
spec.required_ruby_version = ">= 3.0.0"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
Expand Down
3 changes: 0 additions & 3 deletions test/standard/performance/builds_ruleset_test.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
require "test_helper"

# Remove after 2.7 is dropped
return unless RUBY_VERSION > "3"

module Standard::Performance
class BuildsRulesetTest < Minitest::Test
def setup
Expand Down
13 changes: 5 additions & 8 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

require "minitest/autorun"

# Remove branch after 2.7 is dropped
if RUBY_VERSION > "3"
require "mocktail"
require "mocktail"

class Minitest::Test
include Mocktail::DSL
class Minitest::Test
include Mocktail::DSL

def teardown
Mocktail.reset
end
def teardown
Mocktail.reset
end
end

0 comments on commit 7c948b5

Please sign in to comment.