diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index bb7651ca..70b60f11 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -89,8 +89,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: tarpaulin - args: --output-dir coverage --out xml --workspace --exclude benchmarks - + args: --output-dir coverage --out xml --workspace --features serde-error --tests --example testcases --example third_party - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: diff --git a/biscuit-auth/examples/testcases.rs b/biscuit-auth/examples/testcases.rs index 37f09be5..0df792f9 100644 --- a/biscuit-auth/examples/testcases.rs +++ b/biscuit-auth/examples/testcases.rs @@ -68,6 +68,10 @@ fn main() { None => {} }; + run(target, root_key, test, json); +} + +fn run(target: String, root_key: Option, test: bool, json: bool) { let root = if let Some(key) = root_key { KeyPair::from(&PrivateKey::from_bytes_hex(&key).unwrap()) } else { @@ -1973,3 +1977,8 @@ fn print_blocks(token: &Biscuit) -> Vec { v } + +#[test] +fn test_samples() { + run("./samples".to_string(), None, true, false); +}