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

Switch from PhantomJS to headless Chrome #101

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ addons:
before_install:
- export TZ=Europe/Zurich
- mysql -e 'CREATE DATABASE base_test'
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting stuff. Could you explain a bit more (or give a link)?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, Chromedriver isn't found on Travis. Any idea how to fix?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope I had not the time atm.

Copy link
Collaborator

@gurix gurix Jun 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/flavorjones/chromedriver-helper seems to install it properly. Hint came from http://quyetbui.info/chrome-headless-capybara-on-travis-ci/. But i am not sure if i.e google-chrome-stable --headless --disable-gpu ... and the gem capybara-selenium ir really needed in this setting.


before_script:
- cp config/secrets.travis.yml config/secrets.yml
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sleep 3

script:
- RAILS_ENV=test bundle exec rails db:create
- RAILS_ENV=test bundle exec rails db:migrate
Expand Down