Files
SpacetimeDB/tools/ci/README.md
clockwork-labs-bot d93b381719 Add CLA gate status wrapper (#5299)
## Summary
- Add a CLA Gate workflow that publishes a repository-owned commit
status.
- Mirror CLA Assistant license/cla status on pull requests and status
events.
- Publish CLA Gate=success on merge_group runs, because entries have
already passed PR checks before entering the queue.

## Required settings change after merge
 - Remove license/cla from required checks.
 - Add CLA Gate as the required CLA check.

This keeps CLA enforcement before merge queue while removing CLA
Assistant from the merge-group critical path.

## Test plan
 - Parsed .github/workflows/cla-gate.yml with Ruby YAML loader.
 - Ran git diff --check.

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
2026-06-14 22:26:28 +00:00

324 lines
5.9 KiB
Markdown

# SpacetimeDB's cargo ci
## Overview
This document provides an overview of the `cargo ci` command-line tool, and documentation for each of its subcommands and options.
## `cargo ci`
SpacetimeDB 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:**
```bash
Usage: cargo ci [OPTIONS] [COMMAND]
```
**Options:**
- `--skip <SKIP>`: Skip specified subcommands when running all
When 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')
### `test`
Runs 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:**
```bash
Usage: test
```
**Options:**
- `--help`: Print help (see a summary with '-h')
### `lint`
Lints the codebase
Runs rustfmt, clippy, csharpier, TypeScript lint, and generates rust docs to ensure there are no warnings.
**Usage:**
```bash
Usage: lint
```
**Options:**
- `--help`: Print help (see a summary with '-h')
### `wasm-bindings`
Tests Wasm bindings
Runs tests for the codegen crate and builds a test module with the wasm bindings.
**Usage:**
```bash
Usage: wasm-bindings
```
**Options:**
- `--help`: Print help (see a summary with '-h')
### `dlls`
Deprecated; use `cargo regen csharp dlls`.
Builds and packs C# DLLs and NuGet packages for local Unity workflows.
**Usage:**
```bash
Usage: dlls
```
**Options:**
- `--help`: Print help (see a summary with '-h')
### `smoketests`
Runs smoketests
Executes the smoketests suite with some default exclusions.
**Usage:**
```bash
Usage: smoketests [OPTIONS] [ARGS]... [COMMAND]
```
**Options:**
- `--server <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 <DOTNET>`:
- `args <ARGS>`: Additional arguments to pass to the test runner
- `--help`: Print help (see a summary with '-h')
#### `prepare`
Only build binaries without running tests
Use this before running `cargo test --all` to ensure binaries are built.
**Usage:**
```bash
Usage: prepare
```
**Options:**
- `--help`: Print help (see a summary with '-h')
#### `check-mod-list`
**Usage:**
```bash
Usage: check-mod-list
```
**Options:**
- `--help`: Print help
#### `help`
**Usage:**
```bash
Usage: help [COMMAND]...
```
**Options:**
- `subcommand <COMMAND>`: Print help for the subcommand(s)
### `keynote-bench`
Runs the keynote benchmark as a CI performance regression gate.
Assumes release SpacetimeDB binaries and the TypeScript SDK are already built, runs the keynote SpacetimeDB benchmark for 60 seconds against the TypeScript and Rust modules, and fails if throughput is below 275K TPS for TypeScript or 300K TPS for Rust.
**Usage:**
```bash
Usage: keynote-bench
```
**Options:**
- `--help`: Print help (see a summary with '-h')
### `update-flow`
Tests 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:**
```bash
Usage: update-flow [OPTIONS]
```
**Options:**
- `--target <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-docs`
**Usage:**
```bash
Usage: cli-docs [OPTIONS]
```
**Options:**
- `--spacetime-path <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-docs`
**Usage:**
```bash
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-policy`
**Usage:**
```bash
Usage: global-json-policy
```
**Options:**
- `--help`: Print help
### `publish-checks`
**Usage:**
```bash
Usage: publish-checks
```
**Options:**
- `--help`: Print help
### `typescript-test`
**Usage:**
```bash
Usage: typescript-test
```
**Options:**
- `--help`: Print help
### `version-upgrade-check`
**Usage:**
```bash
Usage: version-upgrade-check
```
**Options:**
- `--help`: Print help
### `docs`
**Usage:**
```bash
Usage: docs
```
**Options:**
- `--help`: Print help
### `cla-assistant`
**Usage:**
```bash
Usage: cla-assistant <COMMAND>
```
**Options:**
- `--help`: Print help
#### `retry`
**Usage:**
```bash
Usage: retry [OPTIONS] --pr-number <PR_NUMBER>
```
**Options:**
- `--pr-number <PR_NUMBER>`: Pull request number to check
- `--repo <REPO>`: Repository in `owner/name` form. Defaults to GITHUB_REPOSITORY
- `--help`: Print help
#### `status`
**Usage:**
```bash
Usage: status [OPTIONS] <--pr <PR>|--sha <SHA>>
```
**Options:**
- `--pr <PR>`: Pull request number whose head commit should be checked
- `--sha <SHA>`: Commit SHA to check
- `--repo <REPO>`: Repository in `owner/name` form. Defaults to GITHUB_REPOSITORY
- `--help`: Print help
#### `help`
**Usage:**
```bash
Usage: help [COMMAND]...
```
**Options:**
- `subcommand <COMMAND>`: Print help for the subcommand(s)
### `help`
**Usage:**
```bash
Usage: help [COMMAND]...
```
**Options:**
- `subcommand <COMMAND>`: Print help for the subcommand(s)
---
This document is auto-generated by running:
```bash
cargo ci self-docs
```