skipper-core 1.0.0

Core of Skipper: test-gating via Google Spreadsheet (resolver, Sheets client, sync writer)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/// Operating mode, read from `SKIPPER_MODE`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SkipperMode {
    /// Default: only read the spreadsheet and skip disabled tests.
    ReadOnly,
    /// `SKIPPER_MODE=sync`: also add new tests to the spreadsheet (and prune stale ones).
    Sync,
}

impl SkipperMode {
    pub fn from_env() -> Self {
        match std::env::var("SKIPPER_MODE").as_deref() {
            Ok("sync") => SkipperMode::Sync,
            _ => SkipperMode::ReadOnly,
        }
    }
}