Got it. I had a badly formatted instruction in my .travis.yml file.
A line on the before_script: block was missing the - character at the start.
I discovered the problem by switching on Enable build config validation in the Travis options. It indicated that for the past 8 hours the .travis.yml couldn’t be parsed.