MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / main

Function main

tools/ci/src/main.rs:478–803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

476}
477
478fn main() -> Result<()> {
479 env_logger::init();
480
481 let cli = Cli::parse();
482
483 match cli.cmd {
484 Some(CiCmd::Test) => {
485 cmd!("pnpm", "build").dir("crates/bindings-typescript").run()?;
486
487 // TODO: This doesn't work on at least user Linux machines, because something here apparently uses `sudo`?
488
489 // Exclude smoketests from `cargo test --all` since they require pre-built binaries.
490 // Smoketests have their own dedicated command: `cargo ci smoketests`
491 cmd!(
492 "cargo",
493 "test",
494 "--all",
495 "--exclude",
496 "spacetimedb-smoketests",
497 "--exclude",
498 "spacetimedb-sdk",
499 "--exclude",
500 "spacetimedb",
501 "--",
502 "--test-threads=2",
503 "--skip",
504 "unreal"
505 )
506 .run()?;
507 // Bindings snapshot tests rely on the unstable feature,
508 // as they compile and test APIs which are gated behind that feature,
509 // e.g. procedures, HTTP handlers.
510 cmd!(
511 "cargo",
512 "test",
513 "-p",
514 "spacetimedb",
515 "--features",
516 "unstable",
517 "--",
518 "--test-threads=2",
519 )
520 .run()?;
521 // The SDK test harness uses the same child-process server guard as smoketests,
522 // which expects release CLI/standalone binaries to already exist.
523 cmd!(
524 "cargo",
525 "build",
526 "--release",
527 "-p",
528 "spacetimedb-cli",
529 "-p",
530 "spacetimedb-standalone",
531 "--features",
532 "spacetimedb-standalone/allow_loopback_http_for_tests",
533 )
534 .run()?;
535 // SDK procedure tests intentionally make localhost HTTP requests.

Callers

nothing calls this directly

Calls 15

parseFunction · 0.85
ensure_repo_rootFunction · 0.85
tracked_rs_files_underFunction · 0.85
generate_cli_docsFunction · 0.85
check_global_json_policyFunction · 0.85
run_publish_checksFunction · 0.85
run_typescript_testsFunction · 0.85
run_docs_buildFunction · 0.85
run_all_clap_subcommandsFunction · 0.85
chunksMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…