Files
30-seconds-of-code/javascript/snippets/is-travis-ci.md
2023-05-01 22:35:56 +03:00

552 B

title, type, tags, unlisted, cover, dateModified
title type tags unlisted cover dateModified
Environment is Travis CI snippet
node
true succulent-5 2020-10-20T23:02:01+03:00

Checks if the current environment is Travis CI.

  • Check if the current environment has the TRAVIS and CI environment variables (reference).
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
isTravisCI(); // true (if code is running on Travis CI)