2
votes

I have a weird issue. Travis OSX builds keep failing because a Jasmine unit test doesn't pass. But, this ONLY happens for commits against the main GitHub repo's master branch. Forked repos, PR's on the main repo, etc do not have this issue. Here are a couple of scenarios:

  1. I sync local master from upstream master and push. Travis build fails.

  2. I make a change, literally any change such as adding a random character to readme.md, commit and push, and the build passes.

  3. I open a PR, the PR build passes

  4. The PR is merged to upstream master, the build fails

There are no issues when running the unit tests locally, so I can only pin it as a GitHub and/or Travis issue. Tried clearing the caches in Travis and did not help. I scrolled through the raw logs side-by-side from a failed and passing build and they were fairly identical, at least nothing I wouldn't expect to be different.

So kind of at a loss here on what to do. Any suggestions?

https://github.com/Glavin001/atom-beautify/blob/master/.travis.yml

1
It may be because of .travis.yml file, can you post it here.Krunal Kapadiya
@KrunalKapadiya any ideas?user1795832

1 Answers

1
votes

This was not an issue specifically with the master branch.

The issue was caused by the Travis environment variable, TRAVIS_COMMIT_MESSAGE. When you merge a PR on GitHub, the default commit message has a "message" and a "description", separate by a line break. Having that line break in the TRAVIS_COMMIT_MESSAGE caused path issues with Ruby and/or Rubygems.

This was resolved by blanking out the environment variable by adding the below to our .travis.yml in the before_install step at the very beginning:

- export TRAVIS_COMMIT_MESSAGE=""