Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
921c76b
Pre-build SpacetimeDB binaries once for tests
cloutiertyler Jan 23, 2026
0df9a8b
Add Rust smoketests crate with sql and call test translations
cloutiertyler Jan 23, 2026
8ddcdc9
Add more smoketest translations and simplify call API
cloutiertyler Jan 23, 2026
7cc8e95
Add 5 more smoketest translations and background subscription support
cloutiertyler Jan 23, 2026
d830e22
Add timing breakdown and DEVELOP.md for smoketests
cloutiertyler Jan 23, 2026
b3de380
Add 5 more smoketest translations (7 tests total)
cloutiertyler Jan 23, 2026
2d996f3
Fix unnecessary rebuilds in ensure_binaries_built
cloutiertyler Jan 23, 2026
1db4180
Translate 5 more Python smoketests to Rust
cloutiertyler Jan 23, 2026
bea9069
Add views and auto_migration smoketest translations
cloutiertyler Jan 23, 2026
6373735
Add rls, energy, permissions smoketest translations
cloutiertyler Jan 23, 2026
60cba8d
Add new_user_flow and servers smoketest translations
cloutiertyler Jan 23, 2026
afb0a71
cargo fmt + don't block on lints for now
jdetter Jan 23, 2026
4f4aede
Fix smoketest CLI config isolation and identity switching
cloutiertyler Jan 23, 2026
dafa004
[tyler/translate-smoketests]: lints
bfops Jan 23, 2026
8b6506b
[tyler/translate-smoketests]: more lints
bfops Jan 23, 2026
447413b
[tyler/translate-smoketests]: more lints
bfops Jan 23, 2026
c18ff5c
[tyler/translate-smoketests]: more lints
bfops Jan 23, 2026
95308f2
[tyler/translate-smoketests]: update ci stuff
bfops Jan 23, 2026
ed2735e
[tyler/translate-smoketests]: fix build
bfops Jan 23, 2026
fdba9e5
[tyler/translate-smoketests]: CI fixes?
bfops Jan 23, 2026
09b53de
[tyler/translate-smoketests]: ci
bfops Jan 23, 2026
017a744
[tyler/translate-smoketests]: windows CI
bfops Jan 23, 2026
8ebf8e6
[tyler/translate-smoketests]: fix windows ci
bfops Jan 23, 2026
17cfed7
Add quickstart smoketest translation
cloutiertyler Jan 23, 2026
03bbd19
[tyler/translate-smoketests]: actually fix windows ci
bfops Jan 23, 2026
828cc2d
[tyler/translate-smoketests]: Merge branch 'tyler/translate-smoketest…
bfops Jan 23, 2026
157a814
cargo fmt --all
cloutiertyler Jan 23, 2026
f658b20
[tyler/translate-smoketests]: fix lints
bfops Jan 23, 2026
b8c31a9
[tyler/translate-smoketests]: lints
bfops Jan 23, 2026
da951e9
[tyler/translate-smoketests]: lints
bfops Jan 23, 2026
9835e1e
Add server restart smoketests
cloutiertyler Jan 23, 2026
70bae5b
[tyler/translate-smoketests]: lints
bfops Jan 23, 2026
61cf2b8
[tyler/translate-smoketests]: slim lint
bfops Jan 23, 2026
a2db6af
Fix clippy warnings in guard crate
cloutiertyler Jan 23, 2026
ab70631
Remove spacetime_local in favor of explicit --server flag
cloutiertyler Jan 23, 2026
bd146c5
cargo fmt
cloutiertyler Jan 23, 2026
147f273
Merge branch 'master' into tyler/translate-smoketests
cloutiertyler Jan 23, 2026
ba1f992
temp fix
bfops Jan 23, 2026
3c69f75
re-enable lints
bfops Jan 23, 2026
0f343aa
fix
bfops Jan 23, 2026
27be9ed
Merge branch 'master' into tyler/translate-smoketests
bfops Jan 23, 2026
bfa3dcc
Moved CLI integration tests into crates/smoketests
cloutiertyler Jan 25, 2026
87f318c
Add shared target directory for faster parallel smoketests
cloutiertyler Jan 25, 2026
4e7fee2
Add WASM cache warmup and optimize parallel smoketest execution
cloutiertyler Jan 25, 2026
5a8107f
Add precompiled WASM modules for smoketests
cloutiertyler Jan 25, 2026
4ad3112
Switch smoketests to release mode and remove redundant warmup
cloutiertyler Jan 26, 2026
db95efd
Ran cargo fmt
cloutiertyler Jan 26, 2026
c45e567
Fix C# smoketest parallel execution by removing NuGet cache clearing
cloutiertyler Jan 26, 2026
fcec6ee
Fix clippy warning: use is_some_and instead of map_or
cloutiertyler Jan 26, 2026
9b47a1b
Fix lint
cloutiertyler Jan 26, 2026
363f921
Add Rust smoketests to CI with nextest, keep Python smoketests running
cloutiertyler Jan 26, 2026
236b3d7
Simplify Python smoketest check to fail instead of commenting
cloutiertyler Jan 26, 2026
5b82570
Make Python smoketests job match original smoketests job setup
cloutiertyler Jan 26, 2026
0f67c82
Fix Python smoketests to use python3/python like master's cargo ci sm…
cloutiertyler Jan 26, 2026
fa54086
Uncomment CARGO_TARGET_DIR for smoketest jobs
cloutiertyler Jan 27, 2026
b5d01f3
Match Python smoketests job to master's docker_smoketests configuration
cloutiertyler Jan 27, 2026
bd0bb66
Remove TEST_DURATIONS.md
cloutiertyler Jan 27, 2026
38deed2
Auto-discover precompiled modules instead of manual mapping
cloutiertyler Jan 27, 2026
ed86600
Apply suggestions from code review
cloutiertyler Jan 27, 2026
7414be7
Add permissions block to warn-python-smoketests job
cloutiertyler Jan 27, 2026
42f679e
Add remote server support to Rust smoketests
cloutiertyler Jan 27, 2026
add5eff
Merge branch 'master' into tyler/translate-smoketests
cloutiertyler Jan 27, 2026
73d2209
Exclude smoketests from cargo ci test
cloutiertyler Jan 27, 2026
8fe5ac5
cargo fmt
cloutiertyler Jan 27, 2026
c5499c4
Add .NET build artifacts to .gitignore
cloutiertyler Jan 27, 2026
5266d58
Fix precompiled modules not found in CI
cloutiertyler Jan 27, 2026
833dc98
Consolidate autoinc tests to match Python semantics
cloutiertyler Jan 27, 2026
7385262
Fix confirmed_reads test race condition
cloutiertyler Jan 27, 2026
45af2bd
Remove "moved from" comments in CLI test files
cloutiertyler Jan 27, 2026
c1f53e9
Add basic-rs template to workspace and improve smoketests
cloutiertyler Jan 27, 2026
7674202
Add test_replace_names test and auth support for API calls
cloutiertyler Jan 27, 2026
06669e5
Use precompiled modules-breaking module instead of inline code
cloutiertyler Jan 27, 2026
ee141de
Add test_upload_module_2 and test_hotswap_module tests
cloutiertyler Jan 27, 2026
bfc0252
Use precompiled namespaces module instead of inline code
cloutiertyler Jan 27, 2026
c86854d
Add missing SELECT * FROM * subscription test to permissions
cloutiertyler Jan 27, 2026
dad9b5e
Add missing permission tests: call, describe, logs, publish, replace_…
cloutiertyler Jan 27, 2026
017f42d
Add missing RLS tests: BrokenRls and DisconnectRls
cloutiertyler Jan 27, 2026
7f29dfc
Hold subscription across add call in add_remove_index test
cloutiertyler Jan 27, 2026
45498b6
Merge branch 'master' into tyler/translate-smoketests
cloutiertyler Jan 27, 2026
7790028
[tyler/translate-smoketests]: remove comments referencing deprecated …
bfops Jan 27, 2026
fe717bf
[tyler/translate-smoketests]: Merge remote-tracking branch 'origin/ty…
bfops Jan 27, 2026
1a4ebcc
add todo from @jdetter
bfops Jan 27, 2026
6d59cb1
Update crates/guard/src/lib.rs
bfops Jan 28, 2026
46e63e4
Update crates/guard/src/lib.rs
bfops Jan 28, 2026
941438a
[tyler/translate-smoketests]: Merge remote-tracking branch 'origin/ma…
bfops Jan 28, 2026
6a47135
[tyler/translate-smoketests]: unused
bfops Jan 28, 2026
89a76f8
[tyler/translate-smoketests]: properly use pg_port
bfops Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rustflags = ["--cfg", "tokio_unstable"]
bump-versions = "run -p upgrade-version --"
llm = "run --package xtask-llm-benchmark --bin llm_benchmark --"
ci = "run -p ci --"
smoketest = "run -p xtask-smoketest -- smoketest"
Copy link
Collaborator

@bfops bfops Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose that instead of a new toplevel command, we just update cargo ci smoketests to run these commands. cargo ci is supposed to be the toplevel command that has all the specialty logic for running tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I thought about this, but that's not true of cargo test, which is also meant to run all the testing. My thought was that it should also live under cargo ci smoketest which it currently does.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is true for cargo test, isn't it? cargo ci test? That's at least what that's meant to be.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't personally see the value in a new toplevel command when ci smoketests is right there, but I'm happy to keep it if you think it adds value.

Copy link
Contributor Author

@cloutiertyler cloutiertyler Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean cargo test exists in addition to cargo ci test, so my thought was that it would be the same for cargo smoketest.

So that's why we have both:

cargo smoketest
cargo ci smoketest

Where cargo ci smoketest just calls cargo ci.


[target.x86_64-pc-windows-msvc]
# Use a different linker. Otherwise, the build fails with some obscure linker error that
Expand Down
140 changes: 137 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,107 @@ concurrency:
cancel-in-progress: true

jobs:
docker_smoketests:
smoketests:
needs: [lints]
name: Smoketests
strategy:
matrix:
runner: [spacetimedb-new-runner, windows-latest]
include:
- runner: spacetimedb-new-runner
container:
image: localhost:5000/spacetimedb-ci:latest
options: --privileged
- runner: windows-latest
container: null
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}
timeout-minutes: 120
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/target
steps:
- name: Find Git ref
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
PR_NUMBER="${{ github.event.inputs.pr_number || null }}"
if test -n "${PR_NUMBER}"; then
GIT_REF="$( gh pr view --repo clockworklabs/SpacetimeDB $PR_NUMBER --json headRefName --jq .headRefName )"
else
GIT_REF="${{ github.ref }}"
fi
echo "GIT_REF=${GIT_REF}" >>"$GITHUB_ENV"
- name: Checkout sources
uses: actions/checkout@v4
with:
ref: ${{ env.GIT_REF }}
- uses: dsherret/rust-toolchain-file@v1
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}
shared-key: spacetimedb
cache-on-failure: false
cache-all-crates: true
cache-workspace-crates: true
prefix-key: v1

- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json

# nodejs and pnpm are required for the typescript quickstart smoketest
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- uses: pnpm/action-setup@v4
with:
run_install: true

- name: Install psql (Windows)
if: runner.os == 'Windows'
run: choco install psql -y --no-progress
shell: powershell

- name: Update dotnet workloads
if: runner.os == 'Windows'
run: |
# Fail properly if any individual command fails
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true

cd modules
# the sdk-manifests on windows-latest are messed up, so we need to update them
dotnet workload config --update-mode manifests
dotnet workload update

# This step shouldn't be needed, but somehow we end up with caches that are missing librusty_v8.a.
# ChatGPT suspects that this could be due to different build invocations using the same target dir,
# and this makes sense to me because we only see it in this job where we mix `cargo build -p` with
# `cargo build --manifest-path` (which apparently build different dependency trees).
# However, we've been unable to fix it so... /shrug
- name: Check v8 outputs
shell: bash
run: |
find "${CARGO_TARGET_DIR}"/ -type f | grep '[/_]v8' || true
if ! [ -f "${CARGO_TARGET_DIR}"/debug/gn_out/obj/librusty_v8.a ]; then
echo "Could not find v8 output file librusty_v8.a; rebuilding manually."
cargo clean -p v8 || true
cargo build -p v8
fi

- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Run smoketests
run: cargo ci smoketests

smoketests-python:
needs: [lints]
name: Smoketests (Python Legacy)
strategy:
matrix:
runner: [spacetimedb-new-runner, windows-latest]
Expand Down Expand Up @@ -92,8 +190,10 @@ jobs:
if: runner.os == 'Windows'
run: choco install psql -y --no-progress
shell: powershell

- name: Build crates
run: cargo build -p spacetimedb-cli -p spacetimedb-standalone -p spacetimedb-update

- name: Start Docker daemon
if: runner.os == 'Linux'
run: /usr/local/bin/start-docker.sh
Expand All @@ -104,6 +204,7 @@ jobs:
# Our .dockerignore omits `target`, which our CI Dockerfile needs.
rm .dockerignore
docker compose -f .github/docker-compose.yml up -d

- name: Build and start database (Windows)
if: runner.os == 'Windows'
run: |
Expand All @@ -116,14 +217,18 @@ jobs:
# the sdk-manifests on windows-latest are messed up, so we need to update them
dotnet workload config --update-mode manifests
dotnet workload update

- uses: actions/setup-python@v5
with: { python-version: "3.12" }
if: runner.os == 'Windows'

- name: Install python deps
run: python -m pip install -r smoketests/requirements.txt
- name: Run smoketests

- name: Run Python smoketests
# Note: clear_database and replication only work in private
run: cargo ci smoketests -- ${{ matrix.smoketest_args }} -x clear_database replication teams
run: python -m smoketests ${{ matrix.smoketest_args }} -x clear_database replication teams

- name: Stop containers (Linux)
if: always() && runner.os == 'Linux'
run: docker compose -f .github/docker-compose.yml down
Expand Down Expand Up @@ -906,3 +1011,32 @@ jobs:
repo: targetRepo,
run_id: runId,
});

warn-python-smoketests:
name: Check for Python smoketest edits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
permissions:
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fail if Python smoketests were modified
run: |
PYTHON_SMOKETEST_CHANGES=$(git diff --name-only origin/${{ github.base_ref }} HEAD -- 'smoketests/**.py')
Copy link
Collaborator

@bfops bfops Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heads up, I realized that this will start failing in this PR if anyone merges changes into master that touch the smoketests, even if you don't merge master into this PR. I don't know that that's a bad thing, just wanted to mention it before it's confusing.

if we wanted only-changed-in-this-PR logic, it would have to be:

MERGE_BASE=$(git merge-base origin/${{ github.base_ref }} HEAD)
PYTHON_SMOKETEST_CHANGES="$(git diff --name-only $MERGE_BASE HEAD -- 'smoketests/**.py')"

also we probably want to make this check required just before merging - I suggest leaving this comment unresolved until then.


if [ -n "$PYTHON_SMOKETEST_CHANGES" ]; then
echo "::error::This PR modifies legacy Python smoketests. Please add new tests to the Rust smoketests in crates/smoketests/ instead."
echo ""
echo "Changed files:"
echo "$PYTHON_SMOKETEST_CHANGES"
echo ""
echo "The Python smoketests are being replaced by Rust smoketests."
echo "See crates/smoketests/DEVELOP.md for instructions on adding Rust smoketests."
exit 1
fi

echo "No Python smoketest changes detected."
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ crates/bench/spacetime.svg
crates/bench/sqlite.svg
.vs/

# .NET build artifacts
**/obj/
**/bin/

# benchmark files
out.json
old.json
Expand Down
34 changes: 31 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
exclude = ["crates/smoketests/modules"]
members = [
"crates/auth",
"crates/bench",
Expand Down Expand Up @@ -26,6 +27,7 @@ members = [
"crates/query",
"crates/sats",
"crates/schema",
"crates/smoketests",
"sdks/rust",
"sdks/unreal",
"crates/snapshot",
Expand All @@ -41,6 +43,7 @@ members = [
"modules/keynote-benchmarks",
"modules/perf-test",
"modules/module-test",
"templates/basic-rs/spacetimedb",
"templates/chat-console-rs/spacetimedb",
"modules/sdk-test",
"modules/sdk-test-connect-disconnect",
Expand All @@ -58,6 +61,7 @@ members = [
"tools/generate-client-api",
"tools/gen-bindings",
"tools/xtask-llm-benchmark",
"tools/xtask-smoketest",
"crates/bindings-typescript/test-app/server",
"crates/bindings-typescript/test-react-router-app/server",
"crates/query-builder",
Expand Down
3 changes: 0 additions & 3 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ notify.workspace = true
[dev-dependencies]
pretty_assertions.workspace = true
fs_extra.workspace = true
assert_cmd = "2"
predicates = "3"
spacetimedb-guard.workspace = true

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions crates/cli/src/subcommands/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pub async fn exec(config: Config, args: &ArgMatches) -> Result<(), anyhow::Error
None => sats_to_json(&module_def)?,
};

// TODO: validate the JSON output
println!("{json}");
} else {
// TODO: human-readable API
Expand Down
72 changes: 0 additions & 72 deletions crates/cli/tests/dev.rs

This file was deleted.

Loading
Loading