Files
30-seconds-of-code/snippets/isTravisCI.md
2022-12-04 22:20:49 +02:00

588 B

title, tags, unlisted, cover, firstSeen, lastUpdated
title tags unlisted cover firstSeen lastUpdated
Environment is Travis CI node true blog_images/succulent-5.jpg 2018-01-01T17:28:08+02:00 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)