Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop ruby 2.4 support and test against latest ruby & rails #808

Merged
merged 13 commits into from Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -13,11 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: ['2.7', '2.6', '2.5', '2.4', head, jruby-head]
ruby: ['3.0', '2.7', '2.6', '2.5', head, jruby-head]
os: [ubuntu-latest, windows-latest]
task: [default]
include:
- ruby: '2.4' # lowest supported version
- ruby: '2.5' # lowest supported version
os: ubuntu-latest
task: rubocop
env:
Expand Down
5 changes: 4 additions & 1 deletion .rubocop.yml
@@ -1,11 +1,14 @@
AllCops:
NewCops: enable
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
SuggestExtensions: false
Exclude:
- '**/vendor/bundle/**/*'
- 'spec/fixtures/*/db/schema.rb'

Style/FrozenStringLiteralComment:
Enabled: false

Style/StringLiterals:
Enabled: false

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,10 @@

- None

### Dependencies

- Drop ruby 2.4 support.

# Changelog

## v3.5.1 - 2021-03-07
Expand Down
74 changes: 40 additions & 34 deletions Gemfile.lock
Expand Up @@ -7,49 +7,54 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.4.3)
activesupport (6.1.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.1)
builder (3.2.4)
bump (0.9.0)
colorize (0.8.1)
concurrent-ruby (1.1.6)
cucumber (4.0.0)
concurrent-ruby (1.1.8)
cucumber (4.1.0)
builder (~> 3.2, >= 3.2.3)
cucumber-core (~> 7.0, >= 7.0.0)
cucumber-core (~> 7.1, >= 7.1.0)
cucumber-create-meta (~> 1.0.0, >= 1.0.0)
cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
cucumber-gherkin (~> 13.0, >= 13.0.0)
cucumber-html-formatter (~> 6.0, >= 6.0.1)
cucumber-messages (~> 12.1, >= 12.1.1)
cucumber-wire (~> 3.0, >= 3.0.0)
diff-lcs (~> 1.3, >= 1.3)
cucumber-gherkin (~> 14.0, >= 14.0.1)
cucumber-html-formatter (~> 7.0, >= 7.0.0)
cucumber-messages (~> 12.2, >= 12.2.0)
cucumber-wire (~> 3.1, >= 3.1.0)
diff-lcs (~> 1.3, >= 1.3, < 1.4)
multi_test (~> 0.1, >= 0.1.2)
sys-uname (~> 1.0, >= 1.0.2)
cucumber-core (7.0.0)
cucumber-gherkin (~> 13.0, >= 13.0.0)
cucumber-messages (~> 12.1, >= 12.1.1)
cucumber-core (7.1.0)
cucumber-gherkin (~> 14.0, >= 14.0.1)
cucumber-messages (~> 12.2, >= 12.2.0)
cucumber-tag-expressions (~> 2.0, >= 2.0.4)
cucumber-cucumber-expressions (10.2.0)
cucumber-gherkin (13.0.0)
cucumber-messages (~> 12.0, >= 12.0.0)
cucumber-html-formatter (6.0.2)
cucumber-messages (~> 12.1, >= 12.1.1)
cucumber-messages (12.1.1)
cucumber-create-meta (1.0.0)
cucumber-messages (~> 12.2, >= 12.2.0)
sys-uname (~> 1.2, >= 1.2.1)
cucumber-cucumber-expressions (10.3.0)
cucumber-gherkin (14.2.0)
cucumber-messages (~> 12.4, >= 12.4.0)
cucumber-html-formatter (7.2.0)
cucumber-messages (~> 12.4, >= 12.4.0)
cucumber-messages (12.4.0)
protobuf-cucumber (~> 3.10, >= 3.10.8)
cucumber-tag-expressions (2.0.4)
cucumber-wire (3.0.0)
cucumber-core (~> 7.0, >= 7.0.0)
cucumber-wire (3.1.0)
cucumber-core (~> 7.1, >= 7.1.0)
cucumber-cucumber-expressions (~> 10.1, >= 10.1.0)
cucumber-messages (~> 12.1, >= 12.1.1)
cuke_modeler (3.0.0)
cucumber-gherkin (< 14.0)
cucumber-messages (~> 12.2, >= 12.2.0)
cuke_modeler (3.7.0)
cucumber-gherkin (< 18.0)
diff-lcs (1.3)
ffi (1.13.1)
ffi (1.15.0)
gherkin-ruby (0.3.2)
i18n (1.8.3)
i18n (1.8.9)
concurrent-ruby (~> 1.0)
json (2.3.0)
middleware (0.1.0)
Expand Down Expand Up @@ -97,15 +102,16 @@ GEM
colorize
gherkin-ruby (>= 0.3.2)
json
sys-uname (1.2.1)
ffi (>= 1.0.0)
sys-uname (1.2.2)
ffi (~> 1.1)
test-unit (3.3.6)
power_assert
thor (1.0.1)
thor (1.1.0)
thread_safe (0.3.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.0.0)
zeitwerk (2.4.2)

PLATFORMS
ruby
Expand All @@ -123,4 +129,4 @@ DEPENDENCIES
test-unit

BUNDLED WITH
2.1.4
2.2.15
18 changes: 8 additions & 10 deletions lib/parallel_tests.rb
Expand Up @@ -23,16 +23,14 @@ def determine_number_of_processes(count)

def with_pid_file
Tempfile.open('parallel_tests-pidfile') do |f|
begin
ENV['PARALLEL_PID_FILE'] = f.path
# Pids object should be created before threads will start adding pids to it
# Otherwise we would have to use Mutex to prevent creation of several instances
@pids = pids
yield
ensure
ENV['PARALLEL_PID_FILE'] = nil
@pids = nil
end
ENV['PARALLEL_PID_FILE'] = f.path
# Pids object should be created before threads will start adding pids to it
# Otherwise we would have to use Mutex to prevent creation of several instances
@pids = pids
yield
ensure
ENV['PARALLEL_PID_FILE'] = nil
@pids = nil
end
end

Expand Down
22 changes: 9 additions & 13 deletions lib/parallel_tests/cli.rb
Expand Up @@ -105,13 +105,11 @@ def reprint_output(result, lockfile)

def lock(lockfile)
File.open(lockfile) do |lock|
begin
lock.flock File::LOCK_EX
yield
ensure
# This shouldn't be necessary, but appears to be
lock.flock File::LOCK_UN
end
lock.flock File::LOCK_EX
yield
ensure
# This shouldn't be necessary, but appears to be
lock.flock File::LOCK_UN
end
end

Expand Down Expand Up @@ -228,12 +226,10 @@ def parse_options!(argv)
opts.on("-e", "--exec [COMMAND]", "execute this code parallel and with ENV['TEST_ENV_NUMBER']") { |path| options[:execute] = path }
opts.on("-o", "--test-options '[OPTIONS]'", "execute test commands with those options") { |arg| options[:test_options] = arg.lstrip }
opts.on("-t", "--type [TYPE]", "test(default) / rspec / cucumber / spinach") do |type|
begin
@runner = load_runner(type)
rescue NameError, LoadError => e
puts "Runner for `#{type}` type has not been found! (#{e})"
abort
end
@runner = load_runner(type)
rescue NameError, LoadError => e
puts "Runner for `#{type}` type has not been found! (#{e})"
abort
end
opts.on(
"--suffix [PATTERN]",
Expand Down
2 changes: 1 addition & 1 deletion parallel_tests.gemspec
Expand Up @@ -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.4.0'
s.required_ruby_version = '>= 2.5.0'
end
7 changes: 0 additions & 7 deletions spec/fixtures/rails51/Gemfile

This file was deleted.

124 changes: 0 additions & 124 deletions spec/fixtures/rails51/Gemfile.lock

This file was deleted.

15 changes: 0 additions & 15 deletions spec/fixtures/rails51/app/assets/javascripts/application.js

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions spec/fixtures/rails51/app/helpers/application_helper.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/fixtures/rails51/app/jobs/application_job.rb

This file was deleted.

14 changes: 0 additions & 14 deletions spec/fixtures/rails51/app/views/layouts/application.html.erb

This file was deleted.