GithubHelp home page GithubHelp logo

is_ci's Introduction

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.

is_ci's People

Contributors

zkat avatar 6543 avatar

Stargazers

uncenter avatar Gerard Madorell avatar Terakomari avatar Kushal Shingote avatar  avatar An Cao avatar Brad Svercl avatar Ben Lovy avatar Justin Vieira avatar Bennet Bleßmann avatar Jan Riemer avatar Sung Jeon avatar

Watchers

 avatar  avatar  avatar

Forkers

6543-forks

is_ci's Issues

Please explain in more places how does it work

Hi. Maybe I have trust issues :D, but seeing a crate like this my first and only question was: "how does it know?". I suspected it is checking some env variables, but it took me quite a bit of clicking to arrive at the actual code. Seems like "This crate checks CI and other env variables set by popular CI systems" is worth putting in a https://docs.rs/is_ci/latest/is_ci/ and README.md

BTW. I would feel better if I knew there's a way to force the result both ways. Seems like CI=0 or CI=false or something like that is not implemented. Just thinking aloud. Anyway, thank you for this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.