From 63cd4955222fd4d8e11871cef3b56a6c6b645591 Mon Sep 17 00:00:00 2001 From: Michael Grosser Date: Mon, 20 May 2024 13:59:03 +0200 Subject: [PATCH] drop ruby 2.7 since rails 6 test no longer runs with that --- .github/workflows/test.yml | 4 ++-- .rubocop.yml | 2 +- lib/parallel_tests.rb | 2 +- lib/parallel_tests/cucumber/runner.rb | 4 ++-- parallel_tests.gemspec | 2 +- spec/fixtures/rails61/Gemfile | 2 +- spec/fixtures/rails70/Gemfile | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b29fe068..27a30275 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,11 +10,11 @@ jobs: strategy: fail-fast: false # run all tests so we see which gem/ruby combinations break matrix: - ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', head, jruby-head] + ruby: ['3.0', '3.1', '3.2', '3.3', head, jruby-head] os: [ubuntu-latest, windows-latest] task: [spec] include: - - ruby: '2.7' # lowest supported version, same as gemspec and .rubocop.yml + - ruby: '3.0' # lowest supported version, same as gemspec and .rubocop.yml os: ubuntu-latest task: rubocop steps: diff --git a/.rubocop.yml b/.rubocop.yml index d843d168..cc5c2ec2 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,6 +1,6 @@ AllCops: NewCops: enable - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 SuggestExtensions: false Exclude: - '**/vendor/bundle/**/*' diff --git a/lib/parallel_tests.rb b/lib/parallel_tests.rb index 48e9c94e..71d42dfb 100644 --- a/lib/parallel_tests.rb +++ b/lib/parallel_tests.rb @@ -44,7 +44,7 @@ def pid_file_path def stop_all_processes pids.all.each { |pid| Process.kill(:INT, pid) } - rescue Errno::ESRCH + rescue Errno::ESRCH, Errno::EPERM # Process already terminated, do nothing end diff --git a/lib/parallel_tests/cucumber/runner.rb b/lib/parallel_tests/cucumber/runner.rb index 52805136..f217131f 100644 --- a/lib/parallel_tests/cucumber/runner.rb +++ b/lib/parallel_tests/cucumber/runner.rb @@ -4,8 +4,8 @@ module ParallelTests module Cucumber class Runner < ParallelTests::Gherkin::Runner - SCENARIOS_RESULTS_BOUNDARY_REGEX = /^(Failing|Flaky) Scenarios:$/.freeze - SCENARIO_REGEX = %r{^cucumber features/.+:\d+}.freeze + SCENARIOS_RESULTS_BOUNDARY_REGEX = /^(Failing|Flaky) Scenarios:$/ + SCENARIO_REGEX = %r{^cucumber features/.+:\d+} class << self def name diff --git a/parallel_tests.gemspec b/parallel_tests.gemspec index 3eb00e26..14757587 100644 --- a/parallel_tests.gemspec +++ b/parallel_tests.gemspec @@ -17,5 +17,5 @@ Gem::Specification.new name, ParallelTests::VERSION do |s| s.license = "MIT" s.executables = ["parallel_spinach", "parallel_cucumber", "parallel_rspec", "parallel_test"] s.add_runtime_dependency "parallel" - s.required_ruby_version = '>= 2.7.0' + s.required_ruby_version = '>= 3.0.0' end diff --git a/spec/fixtures/rails61/Gemfile b/spec/fixtures/rails61/Gemfile index 4c199422..da46d124 100644 --- a/spec/fixtures/rails61/Gemfile +++ b/spec/fixtures/rails61/Gemfile @@ -14,6 +14,6 @@ gem 'activesupport', rails_version gem 'railties', rails_version gem 'sprockets-rails' -gem 'sqlite3', '~> 1.7.3' # last before 2.0 +gem 'sqlite3', '~> 1.7.3' # last before 2.0 which has weird install errors gem 'tzinfo-data' gem 'parallel_tests', path: "../../../", group: :development diff --git a/spec/fixtures/rails70/Gemfile b/spec/fixtures/rails70/Gemfile index 92fbf1f8..0d62ddd8 100644 --- a/spec/fixtures/rails70/Gemfile +++ b/spec/fixtures/rails70/Gemfile @@ -13,6 +13,6 @@ gem 'activerecord', rails_version gem 'activesupport', rails_version gem 'railties', rails_version -gem 'sqlite3', '~> 1.7.3' # last before 2.0 +gem 'sqlite3', '~> 1.7.3' # last before 2.0 which has weird install errors gem 'tzinfo-data' gem 'parallel_tests', path: "../../../", group: :development