#ci #build

build is_ci

Super lightweight CI environment checker. Just tells you if you're in CI or not without much fuss.

5 releases (stable)

1.1.1 Sep 22, 2021
1.0.1 Sep 22, 2021
0.0.0 Sep 22, 2021

#131 in Build Utils

Download history 96711/week @ 2022-10-07 104851/week @ 2022-10-14 83950/week @ 2022-10-21 79906/week @ 2022-10-28 64039/week @ 2022-11-04 77737/week @ 2022-11-11 69694/week @ 2022-11-18 63019/week @ 2022-11-25 61324/week @ 2022-12-02 67633/week @ 2022-12-09 61037/week @ 2022-12-16 32681/week @ 2022-12-23 47623/week @ 2022-12-30 62752/week @ 2023-01-06 56513/week @ 2023-01-13 63038/week @ 2023-01-20

236,550 downloads per month
Used in 91 crates (5 directly)

ISC license

5KB
56 lines

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 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 instead.

Example

// 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.

It is based on @npmcli/ci-detect which is released to the community under the ISC License.

No runtime deps