logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 90c00f075a42e9133af035b206a511d438954a3f
parent: 38473f0aa06c848092fe2562f122be75eaffa8d3
Author: Keiji Matsuzaki <futoase@gmail.com>
Date:   Wed,  3 May 2017 19:20:38 +0900

Added support parallel_tests (#2740)

- Added new gem the `parallel_tests`.
- Updated .travis.yml.
  - Improved scripts and environment variable.

Diffstat:

M.travis.yml9++++++---
MGemfile1+
MGemfile.lock4++++
Mconfig/database.yml2+-
4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml @@ -14,6 +14,9 @@ env: - LOCAL_HTTPS=true - RAILS_ENV=test - CXX=g++-4.8 + - NOKOGIRI_USE_SYSTEM_LIBRARIES=true + - PARALLEL_TEST_PROCESSORS=2 + addons: postgresql: 9.4 apt: @@ -31,7 +34,7 @@ rvm: services: - redis-server -bundler_args: --without development production --retry=3 --jobs=3 +bundler_args: --without development production --retry=3 --jobs=16 install: - nvm install @@ -40,10 +43,10 @@ install: - yarn install before_script: - - bundle exec rails db:create db:schema:load + - bundle exec rake parallel:create parallel:load_schema parallel:prepare - bundle exec rails assets:precompile script: - - bundle exec rspec + - bundle exec parallel_test spec/ --group-by filesize --type rspec - npm test - i18n-tasks unused diff --git a/Gemfile b/Gemfile @@ -77,6 +77,7 @@ group :test do gem 'rspec-sidekiq' gem 'simplecov', require: false gem 'webmock' + gem 'parallel_tests' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock @@ -270,6 +270,9 @@ GEM paperclip-av-transcoder (0.6.4) av (~> 0.9.0) paperclip (>= 2.5.2) + parallel (1.11.1) + parallel_tests (2.14.1) + parallel parser (2.4.0.0) ast (~> 2.2) pg (0.20.0) @@ -510,6 +513,7 @@ DEPENDENCIES ox paperclip (~> 5.1) paperclip-av-transcoder + parallel_tests pg pghero pkg-config diff --git a/config/database.yml b/config/database.yml @@ -13,7 +13,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: mastodon_test + database: mastodon_test<%= ENV['TEST_ENV_NUMBER'] %> production: <<: *default