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

PhantomJS versioning on Travis is broken #10361

Closed
rsimha opened this issue Jul 11, 2017 · 1 comment
Closed

PhantomJS versioning on Travis is broken #10361

rsimha opened this issue Jul 11, 2017 · 1 comment
Assignees

Comments

@rsimha
Copy link
Contributor

rsimha commented Jul 11, 2017

PhantomJS provides a headless browser with which we render AMPs while running visual diff tests. The versioning of phantomjs on Travis is currently a mess.

  1. Poltergeist, the library used by Percy, the visual diff tool, to load pages requires phantomjs version 2.1.1 or higher. However, the default version of phantomjs baked into Travis is 2.0.0. See Add support for PhantomJS 2.0 travis-ci/travis-ci#3225
  2. As a result, the phantomjs ruby gem complains that the system version doesn't match the gem version, and therefore, does a reinstall at runtime before running each test. See PhantomJS not detected on Travis colszowka/phantomjs-gem#79
  3. When the version of phantomjs on Travis is upgraded to 2.1.1 during VM setup, the binary is installed in a relative path (./node_modules/.bin/phantomjs). Poltergeist complains that it cannot load the phantomjs binary from a relative path. See Absolute paths can no longer be used to find the phantomjs binary teampoltergeist/poltergeist#389

To fix this for AMP and avoid a triple install of phantomjs, we must set up our Travis VMs to install version 2.1.1 by default, and then insert an absolute path to that binary in the PATH.

@rsimha rsimha self-assigned this Jul 11, 2017
@rsimha rsimha added this to the Sprint H1 July milestone Jul 11, 2017
@rsimha
Copy link
Contributor Author

rsimha commented Jul 11, 2017

Here is what currently happens during every test, even though we install the phantomjs ruby gem, and Travis comes with phantomjs preinstalled.

This should be fixed by #10305.

Phantomjs does not appear to be installed in /home/travis/.phantomjs/2.1.1/x86_64-linux/bin/phantomjs, installing!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  5 22.3M    5 1307k    0     0  1264k      0  0:00:18  0:00:01  0:00:17 1264k
 40 22.3M   40 9365k    0     0  4611k      0  0:00:04  0:00:02  0:00:02 8082k
100 22.3M  100 22.3M    0     0  8392k      0  0:00:02  0:00:02 --:--:-- 12.4M

Successfully installed phantomjs. Yay!
Removed temporarily downloaded files.

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

No branches or pull requests

1 participant