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

[Enhancement] PhantomJS 2.0 running on travis-ci #3895

Merged
merged 1 commit into from
Apr 14, 2015
Merged

[Enhancement] PhantomJS 2.0 running on travis-ci #3895

merged 1 commit into from
Apr 14, 2015

Conversation

mike-north
Copy link
Member

No description provided.

@rwjblue
Copy link
Member

rwjblue commented Apr 14, 2015

We should not need to install it, Travis is installing both phantom 1.9 and 2.0 on their VM's (I'll try to find the issue with details).

@rwjblue
Copy link
Member

rwjblue commented Apr 14, 2015

PhantomJS 2.0.0 is available as /usr/local/phantomjs-2.0.0/bin/phantomjs. 1.9.8 remains the default on $PATH

See travis-ci/travis-cookbooks@e38732d (which I see you commented on actually!?!?), and documented in http://docs.travis-ci.com/user/build-environment-updates/2015-04-09/.

I believe that we just need to add the directory to $PATH.

@mike-north
Copy link
Member Author

Thanks @rwjblue. Not sure how I commented on that and missed it lol!

@stefanpenner
Copy link
Contributor

awesome!

stefanpenner added a commit that referenced this pull request Apr 14, 2015
[Enhancement] PhantomJS 2.0 running on travis-ci
@stefanpenner stefanpenner merged commit 9363be9 into ember-cli:master Apr 14, 2015
@rwjblue
Copy link
Member

rwjblue commented Apr 14, 2015

@stefanpenner - We need to make sure to call this out explicitly in the release notes (both in the detailed list section and the "these changes are required for this version" section. Folks should be ready to update their local environments to use the same version of phantom (it would suck to use 1.9.8 locally but test in Travis against 2.0).

@rwjblue
Copy link
Member

rwjblue commented Apr 14, 2015

HUGE 👍 to this though.

@stefanpenner stefanpenner added this to the v0.2.4 milestone Apr 14, 2015
@stefanpenner
Copy link
Contributor

👍

@mike-north mike-north deleted the patch-1 branch April 14, 2015 19:54
@ef4
Copy link
Contributor

ef4 commented May 20, 2015

Sadly it looks like Travis rolled back the update that provided Phantom 2. So for now this PATH update doesn't do anything. When they finally release it again, people will suddenly get the new version.

@mike-north
Copy link
Member Author

@ef4 Yep they keep rolling back their updates. The workaround for now is to download and install a phantomjs 2.0 binary

before_install:
  - mkdir travis-phantomjs
  - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
  - tar -xvf $PWD/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2 -C $PWD/travis-phantomjs
  - export PATH=$PWD/travis-phantomjs:$PATH
  - "npm config set spin false"
  - "npm install -g npm@^2"

@raycohen
Copy link
Contributor

raycohen commented Jan 4, 2016

Seeing no action from Travis on this. Perhaps it's time to bless the workaround and remove the useless PATH line?

@stefanpenner
Copy link
Contributor

cc @drogus

@runspired
Copy link
Contributor

Travis does seem to be actively encouraging manual installation at the moment.

@drogus
Copy link
Contributor

drogus commented Jan 5, 2016

Sorry for the problems with rolled back updates. I'll check what's the status of the image with phantomjs 2.0 and let you know.

@drogus
Copy link
Contributor

drogus commented Jan 5, 2016

It seems that the recipe for 2.0 is on master in cookbooks, but it's not executed. I'm not familiar with our current cookbooks system, so I'll clarify with someone who does when they get up.

@drogus
Copy link
Contributor

drogus commented Jan 5, 2016

I have an update regarding the situation. Cookbooks that are used for ubuntu precise builds are on precise-stable branch and there's indeed no phantomjs 2.0 recipe there. At the moment we're transitioning from BlueBox to GCE, which takes a lot of effort, so even if we add 2.0 support for ubuntu precise soon, it's uncertain when will it land on VMs.

A workaround would be to use ubuntu trusty or use a manual installation method mentioned above. The downside of using trusty is that it has longer startup time than precise (which uses docker).

There could be also a nicer way of abstracting the setup, ie. I think we could add a simple addon, which would allow you to choose phantomjs version just like so:

addons:
  phantomjs: 2.0.0

A nice thing about the addon is that we could make it work regardless of the changes on VMs and it could be deployed rather soon. Let me know what do you think about something like that.

@stefanpenner
Copy link
Contributor

Can you link docs on how we can create such an add on

@drogus
Copy link
Contributor

drogus commented Jan 5, 2016

@stefanpenner it needs to be created in https://github.com/travis-ci/travis-build, unfortunately we don't allow any third party addons at the moment. What I meant by that is that I could create such an addon for you later this week. That said, if anyone wants to give it a shot, you can take a look at firefox addon, I believe that phantomjs addon would be similar (with an exception of checking if a given version is already there, for example there's no need to install 2.0 on trusty): https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/addons/firefox.rb

@runspired
Copy link
Contributor

I use Travis with phantom 2 with this

---
language: node_js
node_js:
  - "4.2.4"

sudo: required

cache:
  directories:
    - node_modules

env:
  - EMBER_TRY_SCENARIO=default
  - EMBER_TRY_SCENARIO=ember-release
  - EMBER_TRY_SCENARIO=ember-beta
  - EMBER_TRY_SCENARIO=ember-canary

matrix:
  fast_finish: true
  allow_failures:
    - env: EMBER_TRY_SCENARIO=ember-canary

before_install:
  - wget https://s3.amazonaws.com/travis-phantomjs/phantomjs-2.0.0-ubuntu-12.04.tar.bz2
  - tar -xjf phantomjs-2.0.0-ubuntu-12.04.tar.bz2
  - sudo rm -rf /usr/local/phantomjs/bin/phantomjs
  - sudo mv phantomjs /usr/local/phantomjs/bin/phantomjs
  - npm config set spin false
  - npm install -g npm@^2

install:
  - npm install -g bower
  - npm install
  - bower install
  - phantomjs --version

script:
  - ember try $EMBER_TRY_SCENARIO test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants