From ad19c9cf412ca59c8557eb0972094a6dbf87cce5 Mon Sep 17 00:00:00 2001 From: joshua-spacetime Date: Mon, 6 Apr 2026 16:15:15 -0700 Subject: [PATCH] Parallelize smoketests --- .config/nextest.toml | 25 +++++++++++++++++++++++++ .github/workflows/ci.yml | 8 ++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 00000000000..c6aa072721f --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,25 @@ +[test-groups] +# These smoketests rebuild or reconfigure shared TS/C#/C++ toolchain artifacts. +# Keep them mutually exclusive so the rest of the Rust smoketests can continue +# to run under nextest's normal parallel execution. +smoketests-toolchain = { max-threads = 1 } + +[[profile.default.overrides]] +filter = 'package(spacetimedb-smoketests) & test(/^smoketests::csharp_module::/)' +test-group = 'smoketests-toolchain' + +[[profile.default.overrides]] +filter = 'package(spacetimedb-smoketests) & test(/^smoketests::templates::/)' +test-group = 'smoketests-toolchain' + +[[profile.default.overrides]] +filter = 'package(spacetimedb-smoketests) & test(/^smoketests::change_host_type::/)' +test-group = 'smoketests-toolchain' + +[[profile.default.overrides]] +filter = 'package(spacetimedb-smoketests) & test(/^smoketests::quickstart::test_quickstart_(csharp|typescript|cpp)$/)' +test-group = 'smoketests-toolchain' + +[[profile.default.overrides]] +filter = 'package(spacetimedb-smoketests) & test(/^smoketests::views::test_(csharp|typescript)_/)' +test-group = 'smoketests-toolchain' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9c105f4c4c..51fc639694d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,9 +149,9 @@ jobs: - name: Install cargo-nextest uses: taiki-e/install-action@nextest - # --test-threads=1 eliminates contention in the C# tests where they fight over bindings - # build artifacts. - # It also seemed to improve performance a fair amount (11m -> 6m) + # In CI this uses cargo-nextest. Keep the libtest harness on a single thread per + # test process, and let .config/nextest.toml serialize only the shared TS/C#/C++ + # smoketests while the Rust smoketests continue to run concurrently. - name: Run smoketests (Linux) if: runner.os == 'Linux' shell: bash @@ -169,7 +169,7 @@ jobs: if (Test-Path "$env:USERPROFILE\emsdk\emsdk_env.ps1") { & "$env:USERPROFILE\emsdk\emsdk_env.ps1" | Out-Null } - cargo ci smoketests -- --test-threads=1 + cargo ci smoketests -- --test-threads=1 - name: Check for changes run: |