Files
30-seconds-of-code/snippets/js/s/is-travis-ci.md
2023-05-07 16:07:29 +03:00

573 B

title, type, language, tags, unlisted, cover, dateModified
title type language tags unlisted cover dateModified
Environment is Travis CI snippet javascript
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)