CI - cargo test runs C# and TypeScript tests#4921
CI - cargo test runs C# and TypeScript tests#4921bfops wants to merge 58 commits intobfops/translate-scriptfrom
cargo test runs C# and TypeScript tests#4921Conversation
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
….com:clockworklabs/SpacetimeDB into bfops/cargo-test-all
…rgo-ci-test' into bfops/cargo-test-all
Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
….com:clockworklabs/SpacetimeDB into bfops/cargo-test-all
…into bfops/cargo-test-all
|
Very unlikely to be related to this PR but the typescript tests don't pass on Windows: |
|
csharp tests don't work on windows due to executing a bash script: |
jdetter
left a comment
There was a problem hiding this comment.
I think ideally this would work on both Unix and Windows based systems. There seem to be a few problems preventing this from working on Windows and I think that should maybe be a requirement for this PR. What do you think?
| // if they're not pushed to NuGet. | ||
| // See https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file for more info on the config file. | ||
| let status = Command::new("bash") | ||
| .args(["./tools~/write-nuget-config.sh", "../.."]) |
There was a problem hiding this comment.
In order for this to work on Windows as well it might be best to translate this script into rust and then inline it here, what do you think? Either that or we need an equivalent powershell script so that this will also work on windows and we need to invoke the powershell script instead if we're running on windows.
There was a problem hiding this comment.
Yeah, that's fair.
I've created #4970 to do this more generally for all of our bash scripts.
| let guard = SpacetimeDbGuard::spawn_in_temp_data_dir(); | ||
| let cwd = workspace.join("sdks/csharp"); | ||
| let status = Command::new("bash") | ||
| .args(["tools~/run-regression-tests.sh"]) |
There was a problem hiding this comment.
same here - what do you think about translating this script into rust and inlining it here?
…anslate-script' into bfops/cargo-test-all
…anslate-script' into bfops/cargo-test-all
…anslate-script' into bfops/cargo-test-all
…anslate-script' into bfops/cargo-test-all
…anslate-script' into bfops/cargo-test-all
Description of Changes
C# and TypeScript tests can now be run via
cargo test.This also involved updating some test code to take a server url override, so they could use the existing
SpacetimeDBGuard(which starts the server on an arbitrary port rather than a hardcoded 3000).mastercargo ci dlls->cargo regen csharp dllscargo testruns C# and TypeScript testscargo testAPI and ABI breaking changes
None. CI only.
Expected complexity level and risk
2
Testing
Failure reporting was checked with synthetic failing tests after the standard harness checks.
TypeScript harness:
cargo test -p spacetimedb-typescript-testspnpm build,pnpm vitest runwith a JUnit report, thenpnpm vitest typecheck --run. Reports are written undertarget/language-tests/typescript/.C# harness:
cargo build -p spacetimedb-cli -p spacetimedb-standalone --features spacetimedb-standalone/allow_loopback_http_for_testscargo test -p spacetimedb-csharp-testsspacetimedb-guard. TRX reports are written undertarget/language-tests/csharp/.Synthetic failure check
cargo test -p spacetimedb-typescript-tests --test typescript -- --filter SyntheticHarnessFailurecargo test -p spacetimedb-csharp-tests --test csharp -- --filter SyntheticHarnessFailure