1
0
Fork 0
forked from fedi/mastodon

Added support parallel_tests (#2740)

- Added new gem the `parallel_tests`.
- Updated .travis.yml.
  - Improved scripts and environment variable.
This commit is contained in:
Keiji Matsuzaki 2017-05-03 19:20:38 +09:00 committed by Eugen Rochko
parent 38473f0aa0
commit 90c00f075a
4 changed files with 12 additions and 4 deletions

View file

@ -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

View file

@ -77,6 +77,7 @@ group :test do
gem 'rspec-sidekiq'
gem 'simplecov', require: false
gem 'webmock'
gem 'parallel_tests'
end
group :development do

View file

@ -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

View file

@ -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