Saya telah berjuang hampir sepanjang hari untuk menyiapkan travis dengan parallel_tests, dan saya tidak dapat memahami mengapa itu tidak berfungsi.
# .travis.yml
language: ruby
rvm:
- 2.2.2
env:
- DB=postgresql
cache: bundler
addons:
postgresql: "9.4"
services:
- postgresql
- redis
script:
- RAILS_ENV=test bundle exec rake teaspoon
- RAILS_ENV=test xvfb-run -a bundle exec rake parallel:spec
before_script:
- "sh -e /etc/init.d/xvfb start"
- cp config/database.travis.yml config/database.yml
- export PARALLEL_TEST_PROCESSORS=4
- RAILS_ENV=development bundle exec rake db:drop
- RAILS_ENV=development bundle exec rake db:create
- RAILS_ENV=development bundle exec rake db:migrate
- bundle exec rake parallel:create
- bundle exec rake parallel:prepare
Basis data saya.travis.yml
development:
adapter: postgresql
encoding: utf8
host: localhost
database: adiq_dev
pool: 25
username: postgres
password:
test:
adapter: postgresql
encoding: utf8
host: localhost
database: adiq_test<%= ENV['TEST_ENV_NUMBER'] %>
pool: 25
username: postgres
password:
Pada persiapan paralel, saya terus mendapatkan ini
You have 174 pending migrations:
...
...
Run rake db:migrate to update your database then try again.
The command "bundle exec rake parallel:prepare" failed and exited with 1 during .
Rantai perintah yang tepat tampaknya berfungsi dengan baik di lokal saya. Saya tidak mengerti, di mana kesalahan saya?
Setiap saran akan sangat berharga....Saya telah menghabiskan banyak waktu untuk mencoba membuat ini berhasil.
rake db:migrate
di antara langkah pembuatan dan persiapan, atau setelah langkah persiapan - person набиячлэвэли   schedule 07.02.2016