Try modifying before_script to configure phantomjs.