Skip to content

Commit

Permalink
ci: Add the test cases for three new examples.
Browse files Browse the repository at this point in the history
Just try to run once...
  • Loading branch information
langyo committed Oct 23, 2023
1 parent ecbc2f3 commit ea85560
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/proxy_gluesql_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ sea-orm = { path = "../../", features = [
gluesql = { version = "0.13", default-features = false, features = [
"memory-storage",
] }

[dev-dependencies]
smol = { version = "1.2" }
smol-potat = { version = "1.1" }
8 changes: 8 additions & 0 deletions examples/proxy_gluesql_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,11 @@ async fn main() {
let list = Entity::find().all(&db).await.unwrap().to_vec();
println!("Result: {:?}", list);
}

#[cfg(test)]
mod tests {
#[smol_potat::test]
async fn try_run() {
crate::main()
}
}
4 changes: 4 additions & 0 deletions examples/proxy_surrealdb_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ sea-orm = { path = "../../", features = [
"debug-print",
] }
surrealdb = { version = "1", features = ["kv-mem"] }

[dev-dependencies]
smol = { version = "1.2" }
smol-potat = { version = "1.1" }
8 changes: 8 additions & 0 deletions examples/proxy_surrealdb_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,11 @@ async fn main() {
let list = Entity::find().all(&db).await.unwrap().to_vec();
println!("Result: {:?}", list);
}

#[cfg(test)]
mod tests {
#[smol_potat::test]
async fn try_run() {
crate::main()
}
}
4 changes: 4 additions & 0 deletions examples/proxy_wasmtime_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ sea-orm = { path = "../..", features = [
"sqlx-sqlite",
"runtime-async-std-rustls",
] }

[dev-dependencies]
smol = { version = "1.2" }
smol-potat = { version = "1.1" }
10 changes: 10 additions & 0 deletions examples/proxy_wasmtime_example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,13 @@ async fn main() -> Result<()> {

Ok(())
}

#[cfg(test)]
mod tests {
use anyhow::Result;

#[smol_potat::test]
async fn try_run() -> Result<()> {
crate::main()
}
}

0 comments on commit ea85560

Please sign in to comment.