https://github.com/zkat/is_ci
Super lightweight and dead-simple CI detection.
https://github.com/zkat/is_ci
Last synced: 8 months ago
JSON representation
Super lightweight and dead-simple CI detection.
- Host: GitHub
- URL: https://github.com/zkat/is_ci
- Owner: zkat
- License: other
- Created: 2021-09-22T16:32:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T02:57:58.000Z (almost 2 years ago)
- Last Synced: 2025-04-15T22:50:02.248Z (8 months ago)
- Language: Rust
- Size: 29.3 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
This crate tells you if you're in a CI environment or not. It does not tell
you **which** you're in, but it makes a good effort to make sure to accurately
tell you whether you're in one.
This crate is based on the
[`@npmcli/ci-detect`](https://npm.im/@npmcli/ci-detect) package.
If you need more information about the specific CI environment you're running
in and you can handle a heavier dependency, please consider using
[`ci_info`](https://crates.io/crates/ci_info) instead.
## Example
```rust
// You can call this repeatedly if you want to get the same result, cached.
let am_i_in_ci_right_now = is_ci::cached();
// If you expect your environment to change between calls, use this instead:
let checking_again_just_in_case = is_ci::uncached();
```
## License
`is_ci` is released to the Rust community under the [ISC License](./LICENSE).
It is based on `@npmcli/ci-detect` which is released to the community under
the [ISC License](https://github.com/npm/ci-detect/blob/main/LICENSE).