Skip to content

Commit 28acc2c

Browse files
committed
Parallelise test suite run
1 parent e4b254b commit 28acc2c

File tree

10 files changed

+46
-25
lines changed

10 files changed

+46
-25
lines changed

.rspec_parallel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--format progress
2+
--format ParallelTests::RSpec::RuntimeLogger --out tmp/parallel_runtime_rspec.log
3+
--format ParallelTests::RSpec::SummaryLogger --out tmp/spec_summary.log

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ group :development, :test do
141141
gem "spring-commands-rspec", "~> 1.0"
142142
gem "tty-command", "~> 0.10"
143143
gem "vcr", "~> 4.0"
144+
gem "warning", "~> 1.3"
144145
end
145146

146147
group :test do

Gemfile.lock

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ GEM
117117
approvals (0.0.24)
118118
nokogiri (~> 1.6)
119119
thor (~> 0.18)
120-
archive-zip (0.11.0)
120+
archive-zip (0.12.0)
121121
io-like (~> 0.3.0)
122122
arel (8.0.0)
123123
ast (2.4.0)
@@ -179,13 +179,14 @@ GEM
179179
bundler (~> 1.2)
180180
thor (~> 0.18)
181181
byebug (11.0.0)
182-
capybara (3.13.2)
182+
capybara (3.39.2)
183183
addressable
184+
matrix
184185
mini_mime (>= 0.1.3)
185186
nokogiri (~> 1.8)
186187
rack (>= 1.6.0)
187188
rack-test (>= 0.6.3)
188-
regexp_parser (~> 1.2)
189+
regexp_parser (>= 1.5, < 3.0)
189190
xpath (~> 3.2)
190191
carrierwave (1.3.1)
191192
activemodel (>= 4.0.0)
@@ -197,9 +198,8 @@ GEM
197198
fastimage
198199
caze (0.2.2)
199200
activesupport (>= 3)
200-
childprocess (0.9.0)
201-
ffi (~> 1.0, >= 1.0.11)
202-
chromedriver-helper (2.1.0)
201+
childprocess (3.0.0)
202+
chromedriver-helper (2.1.1)
203203
archive-zip (~> 0.10)
204204
nokogiri (~> 1.8)
205205
cloudinary (1.11.1)
@@ -551,7 +551,7 @@ GEM
551551
inline_svg (1.3.1)
552552
activesupport (>= 3.0)
553553
nokogiri (>= 1.6)
554-
io-like (0.3.0)
554+
io-like (0.3.1)
555555
ipaddress (0.8.3)
556556
jaro_winkler (1.5.2)
557557
jbuilder (2.8.0)
@@ -596,6 +596,7 @@ GEM
596596
lumberjack (1.0.13)
597597
mail (2.7.1)
598598
mini_mime (>= 0.1.1)
599+
matrix (0.4.2)
599600
memoist (0.16.0)
600601
memoizable (0.4.2)
601602
thread_safe (~> 0.3, >= 0.3.1)
@@ -607,8 +608,8 @@ GEM
607608
mime-types (3.2.2)
608609
mime-types-data (~> 3.2015)
609610
mime-types-data (3.2018.0812)
610-
mini_mime (1.0.1)
611-
mini_portile2 (2.4.0)
611+
mini_mime (1.1.5)
612+
mini_portile2 (2.8.5)
612613
minitest (5.20.0)
613614
momentjs-rails (2.20.1)
614615
railties (>= 3.1)
@@ -626,8 +627,9 @@ GEM
626627
newrelic_rpm (9.6.0)
627628
base64
628629
nio4r (2.3.1)
629-
nokogiri (1.10.2)
630-
mini_portile2 (~> 2.4.0)
630+
nokogiri (1.15.5)
631+
mini_portile2 (~> 2.8.2)
632+
racc (~> 1.4)
631633
notiffany (0.1.1)
632634
nenv (~> 0.1)
633635
shellany (~> 0.0)
@@ -657,8 +659,8 @@ GEM
657659
rack
658660
orm_adapter (0.5.0)
659661
os (1.0.0)
660-
parallel (1.13.0)
661-
parallel_tests (2.27.1)
662+
parallel (1.23.0)
663+
parallel_tests (2.32.0)
662664
parallel
663665
parser (2.6.0.0)
664666
ast (~> 2.4.0)
@@ -676,7 +678,7 @@ GEM
676678
pry (~> 0.10)
677679
pry-rails (0.3.9)
678680
pry (>= 0.10.4)
679-
public_suffix (3.0.3)
681+
public_suffix (3.1.1)
680682
puma (3.12.0)
681683
pundit (2.0.1)
682684
activesupport (>= 3.0.0)
@@ -691,7 +693,8 @@ GEM
691693
rest-client
692694
pusher-signature (0.1.8)
693695
raabro (1.1.6)
694-
rack (2.0.6)
696+
racc (1.7.3)
697+
rack (2.2.8)
695698
rack-contrib (2.4.0)
696699
rack (< 4)
697700
rack-host-redirect (1.3.0)
@@ -702,8 +705,8 @@ GEM
702705
rack
703706
rack-proxy (0.6.5)
704707
rack
705-
rack-test (1.1.0)
706-
rack (>= 1.0, < 3)
708+
rack-test (2.1.0)
709+
rack (>= 1.3)
707710
rack-timeout (0.5.1)
708711
rails (5.1.6.2)
709712
actioncable (= 5.1.6.2)
@@ -750,7 +753,7 @@ GEM
750753
recaptcha (4.13.1)
751754
json
752755
redcarpet (3.4.0)
753-
regexp_parser (1.3.0)
756+
regexp_parser (2.8.2)
754757
representable (3.0.4)
755758
declarative (< 0.1.0)
756759
declarative-option (< 0.2.0)
@@ -806,7 +809,7 @@ GEM
806809
ruby-prof (0.17.0)
807810
ruby-progressbar (1.10.0)
808811
ruby_dep (1.5.0)
809-
rubyzip (1.2.2)
812+
rubyzip (1.3.0)
810813
s3_direct_upload (0.1.7)
811814
coffee-rails (>= 3.1)
812815
jquery-fileupload-rails (~> 0.4.1)
@@ -838,9 +841,9 @@ GEM
838841
sdoc (1.0.0)
839842
rdoc (>= 5.0)
840843
selectize-rails (0.12.6)
841-
selenium-webdriver (3.141.0)
842-
childprocess (~> 0.5)
843-
rubyzip (~> 1.2, >= 1.2.2)
844+
selenium-webdriver (3.142.7)
845+
childprocess (>= 0.5, < 4.0)
846+
rubyzip (>= 1.2.2)
844847
serviceworker-rails (0.5.5)
845848
railties (>= 3.1)
846849
share_meow_client (0.1.3)
@@ -941,6 +944,7 @@ GEM
941944
equalizer (~> 0.0, >= 0.0.9)
942945
warden (1.2.8)
943946
rack (>= 2.0.6)
947+
warning (1.3.0)
944948
web-console (3.7.0)
945949
actionview (>= 5.0)
946950
activemodel (>= 5.0)
@@ -1107,6 +1111,7 @@ DEPENDENCIES
11071111
uglifier (~> 4.1)
11081112
validate_url (~> 1.0)
11091113
vcr (~> 4.0)
1114+
warning (~> 1.3)
11101115
web-console (~> 3.7)
11111116
webmock (~> 3.5)
11121117
webpacker (~> 3.5)

config/boot.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
22

3+
require "warning"
4+
Gem.path.each do |path|
5+
Warning.ignore(//, path)
6+
end
7+
38
require "bundler/setup" # Set up gems listed in the Gemfile.

config/environments/development.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def yarn_integrity_enabled?
4040

4141
# Print deprecation notices to the Rails logger.
4242
config.active_support.deprecation = :log
43+
$VERBOSE = nil
4344

4445
# Raise an error on page load if there are pending migrations.
4546
config.active_record.migration_error = :page_load

config/environments/test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
config.active_support.test_order = :random
4444

4545
# Print deprecation notices to the stderr.
46-
config.active_support.deprecation = :stderr
46+
config.active_support.deprecation = :log
47+
$VERBOSE = nil
4748

4849
# Raises error for missing translations
4950
# config.action_view.raise_on_missing_translations = true

lib/tasks/test.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ namespace :test do
33
task run: :environment do
44
abort 'InfluxDB not running!' unless influx_running?
55

6-
cmd = 'rspec'
6+
# cmd = 'rspec'
7+
cmd = "RUBYOPT='-W0 -W:no-experimental' bundle exec rake parallel:spec[3,'spec/(?!features)']"
78
puts "Running rspec via `#{cmd}`"
89
command = TTY::Command.new(printer: :quiet, color: true)
910

spec/rails_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383

8484
stub_request(:any, /api.mailchimp.com/).
8585
to_return(status: 200, body: "", headers: {})
86+
87+
stub_request(:post, /www.google-analytics.com/).
88+
to_return(status: 200, body: "", headers: {})
8689
end
8790

8891
OmniAuth.config.test_mode = true

spec/spec_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,5 @@
104104
# # test failures related to randomization by passing the same `--seed` value
105105
# # as the one that triggered the failure.
106106
# Kernel.srand config.seed
107+
config.exclude_pattern = 'spec/features/**/*_spec.rb' unless ARGV.detect { _1 =~ /^spec/ } =~ /^spec\/features/
107108
end

spec/support/initializers/capybara.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
)
1717
end
1818

19-
Capybara.javascript_driver = :headless_chrome
19+
Capybara.javascript_driver = :selenium_chrome_headless

0 commit comments

Comments
 (0)