#ci #continuous-integration #circle #travis

rci

Check if your tests are running in a continuous integration service

1 unstable release

Uses old Rust 2015

0.1.1 Feb 27, 2016

#638 in Testing

28 downloads per month
Used in 2 crates

MIT license

7KB
136 lines

rci - Continuous Integration Environment

Build Status Circle CI

rci is wrapper for environment variables of some common continiuous integration services. At the moment travis and circle-ci is supported. A possible use case for this library is to check if your tests are running in an contniuous service. Don't use this to skip all of your tests and pretend everything works fine! If you are testing for example audio or graphics output that is not available in certain CI environments then you can use this library to skip those tests.

Usage

Add it to your dependencies section in your projects Cargo.toml:

[dependencies]
rci = 0.1.*

lib.rs:

rci is wrapper for environment variables of some common continiuous integration services. At the moment travis and circle-ci is supported. A possible use case for this library is to check if your tests are running in an contniuous service. Don't use this to skip all of your tests and pretend everything works fine! If you are testing for example audio or graphics output that is not available in certain CI environments then you can use this library to skip those tests, like shown in the following example:

use rci::*;

let ci = Ci::new();
if ci.is_none() {
    return;
} else {
    println!("I'm running in: {}", ci.unwrap());
}

No runtime deps