Travis build badge showing failed

I have observed that the travis ci build badge is not reflecting the actual status of the build. It keeps on showing failed while it is successful.

Duplicate of