tools/ci/README.md
This document provides an overview of the cargo ci command-line tool, and documentation for each of its subcommands and options.
cargo ciSpacetimeDB CI tasks
This tool provides several subcommands for automating CI workflows in SpacetimeDB.
It may be invoked via cargo ci <subcommand>, or simply cargo ci to run all subcommands in sequence. It is mostly designed to be run in CI environments via the github workflows, but can also be run locally
Usage:
Usage: cargo ci [OPTIONS] [COMMAND]
Options:
--skip: Skip specified subcommands when running allWhen no subcommand is specified, all subcommands are run in sequence. This option allows specifying subcommands to skip when running all. For example, to skip the unreal-tests subcommand, use --skip unreal-tests.
--help: Print help (see a summary with '-h')testRuns tests
Runs rust tests, codegens csharp sdk and runs csharp tests. This does not include Unreal tests. This expects to run in a clean git state.
Usage:
Usage: test
Options:
--help: Print help (see a summary with '-h')lintLints the codebase
Runs rustfmt, clippy, csharpier, TypeScript lint, and generates rust docs to ensure there are no warnings.
Usage:
Usage: lint
Options:
--help: Print help (see a summary with '-h')wasm-bindingsTests Wasm bindings
Runs tests for the codegen crate and builds a test module with the wasm bindings.
Usage:
Usage: wasm-bindings
Options:
--help: Print help (see a summary with '-h')dllsDeprecated; use cargo regen csharp dlls.
Builds and packs C# DLLs and NuGet packages for local Unity workflows.
Usage:
Usage: dlls
Options:
--help: Print help (see a summary with '-h')smoketestsRuns smoketests
Executes the smoketests suite with some default exclusions.
Usage:
Usage: smoketests [OPTIONS] [ARGS]... [COMMAND]
Options:
--server: Run tests against a remote server instead of spawning local servers.When specified, tests will connect to the given URL instead of starting local server instances. Tests that require local server control (like restart tests) will be skipped.
--dotnet:args: Additional arguments to pass to the test runner--help: Print help (see a summary with '-h')prepareOnly build binaries without running tests
Use this before running cargo test --all to ensure binaries are built.
Usage:
Usage: prepare
Options:
--help: Print help (see a summary with '-h')check-mod-listUsage:
Usage: check-mod-list
Options:
--help: Print helphelpUsage:
Usage: help [COMMAND]...
Options:
subcommand: Print help for the subcommand(s)update-flowTests the update flow
Tests the self-update flow by building the spacetimedb-update binary for the specified target, by default the current target, and performing a self-install into a temporary directory.
Usage:
Usage: update-flow [OPTIONS]
Options:
--target: Target triple to build for, by default the current target. Used by github workflows to check the update flow on multiple platforms.--github-token-auth: Whether to enable github token authentication feature when building the update binary. By default this is disabled.--help: Print help (see a summary with '-h')cli-docsUsage:
Usage: cli-docs [OPTIONS]
Options:
--spacetime-path: specify a custom path to the SpacetimeDB repository root (where the main Cargo.toml is located)--help: Print help (see a summary with '-h')self-docsUsage:
Usage: self-docs [OPTIONS]
Options:
--check: Only check for changes, do not generate the docs--help: Print help (see a summary with '-h')global-json-policyUsage:
Usage: global-json-policy
Options:
--help: Print helppublish-checksUsage:
Usage: publish-checks
Options:
--help: Print helptypescript-testUsage:
Usage: typescript-test
Options:
--help: Print helpversion-upgrade-checkUsage:
Usage: version-upgrade-check
Options:
--help: Print helpdocsUsage:
Usage: docs
Options:
--help: Print helphelpUsage:
Usage: help [COMMAND]...
Options:
subcommand: Print help for the subcommand(s)This document is auto-generated by running:
cargo ci self-docs