based on https://github.com/watson/ci-info/blob/HEAD/index.js
()
| 78 | |
| 79 | // based on https://github.com/watson/ci-info/blob/HEAD/index.js |
| 80 | func IsCI() bool { |
| 81 | return os.Getenv( |
| 82 | "CI", |
| 83 | ) != "" || // GitHub Actions, Travis CI, CircleCI, Cirrus CI, GitLab CI, AppVeyor, CodeShip, dsari |
| 84 | os.Getenv("CONTINUOUS_INTEGRATION") != "" || // Travis CI, Cirrus CI |
| 85 | os.Getenv("BUILD_NUMBER") != "" || // Jenkins, TeamCity |
| 86 | os.Getenv("CI_APP_ID") != "" || // Appflow |
| 87 | os.Getenv("CI_BUILD_ID") != "" || // Appflow |
| 88 | os.Getenv("CI_BUILD_NUMBER") != "" || // Appflow |
| 89 | os.Getenv("RUN_ID") != "" // TaskCluster, dsari |
| 90 | } |
| 91 | |
| 92 | // Convert slice of string to a readable string |
| 93 | // eg: ["one", "two", "three"] -> "one, two and three" |
no outgoing calls
no test coverage detected