Google+ knowuh on twitter knowuh on github Instagram

Noah Paessel

Fixing Cypress and S3_website on Travis-CI

You may notice one day soon that Cypress test suddenly stop working on your Travis builds. This is probably because Travis is rolling out new releases of their linux build containers. The latest (as of 2019-05-08 ) default build environment is Xenial.

You can pin your build environment to a specific Ubuntu release in your travis.yml files by adding: dist: trusty to the configuration (top level item).

But eventually you are going to want to update. Travis eventually will stop supporting your environment. The current release of Cypress has a dependency onlibgconf-2-4. This package is not installed by default on Xenial, so you unless you pin your build to a previous release, you are going to need to add those dependencies in your travis.yml file, like this:

  addons:
    apt:
      packages:
        - libgconf-2-4

If you also happen to use theS3_websitegem you are going to run into a similar problem related to the version of the JDK installed in Xenial. By Default Xenial ships with Java 11, and the S3_website depends on Java 8. I found this SO Thread Ssuggesting that you could add these dependencies in a similar way as the above libconf example:

  addons:
    apt:
      packages:
        - oracle-java8-installer
        - oracle-java8-set-default

But this didn't work for me. So, I ended up pinning the build image to dist: trusty ¯_(ツ)_/¯