Inconsistent results with Travis CI and tox

心已入冬 提交于 2019-12-12 03:19:08

问题


I have set up continuous integration for my open source project at Travis. tox seems to be having some problems with quotes in the commands, so I set up a temporary branch for debugging the problem. At this point I am encountering a very strange issue.

The last 3 commits and their build status on Travis:

  • Bla - build 32 passed
  • eklzjfljkze - build 32 failed
  • Revert "eklzjfljkze" - build 34 failed

As the last commit reverts the one that caused the failure, I see no reason why build 34 shouldn't pass. Perhaps Travis is caching some stuff, but Travis's Settings->Caching says "No caches have been created yet". As I'm using the free plan for open source projects, I don't think I can even enable caching.

From previous attempts, I have noticed that if I roll back the branch to the passing commit ('Bla') using git push --force, the build will pass again.

All of these commits work fine locally using the same python and tox versions.

What's going on?

EDIT Now it's failing in a simular way. Compare builds 36 and 37. The commit in build 37 only makes a change to the README, so it doesn't affect the build in any way. There must be some kind of conflict with Travis and Tox.


回答1:


Travis makes a shallow clone, limiting it to the last 50 commits. In my setup.py script, I call git describe which fails if no tags are present in the clone. Hence, the problem occurs when the shallow clone does not contain any tags...



来源:https://stackoverflow.com/questions/33011318/inconsistent-results-with-travis-ci-and-tox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!