In general you can detect if you are on Travis-CI by checking the environment variables. You can check either for CI=true
or the more specific TRAVIS=true
. In PHP you can use the getenv()
function to get the value of an environment variable.
See the complete list of the environment. You can set even more env variables in your .travis.yml.