CI - Run unity tests through cargo test#4948
CI - Run unity tests through cargo test#4948bfops wants to merge 11 commits intobfops/cargo-test-allfrom
cargo test#4948Conversation
cargo testcargo test
…cargo-test-all' into bfops/cargo-unity-test
…thub.com:clockworklabs/SpacetimeDB into bfops/cargo-unity-test
…cargo-test-all' into bfops/cargo-unity-test
jdetter
left a comment
There was a problem hiding this comment.
This looks great so far, just one question from me.
I think it's a bit bad dev UX that a unity path is required:
could not find Unity. Pass --unity-path, set UNITY_PATH or UNITY_EXECUTABLE, install Unity 2022.3.32f1 in a standard GitHub runner path, or set UNITY_USE_DOCKER=1
error: test failed, to rerun pass `-p spacetimedb-unity-tests --test unity`
Caused by:
process didn't exit successfully: `C:\Users\boppy\clockwork\SpacetimeDB\target\debug\deps\unity-5022c0874751acf7.exe` (exit code: 1)
Error: command ["cargo", "test", "-p", "spacetimedb-unity-tests", "--test", "unity"] exited with code 1
error: process didn't exit successfully: `target\debug\ci.exe unity-tests --skip-dlls` (exit code: 1)
I think the error message here is helpful enough here where it wouldn't take a typical developer long to get the right parameter so I think it's fine. I think a better dev UX would be that if you could specify a unity version then we could try to find that unity version at the typical install paths and then if we can't find it we just give up. We definitely shouldn't just use whatever Unity version is available, I think you should at least have to specify that. What do you think?
| with: | ||
| global-json-file: global.json | ||
|
|
||
| - name: Override NuGet packages |
There was a problem hiding this comment.
Did we not need this? I can't seem to find these changes in the unity.rs file
There was a problem hiding this comment.
We at least need to dotnet pack and move the binaries into the proper place within the Unity repo, no?
|
One more thing on this, I actually tried to pass |
|
The C# tests didn't work immediately for me in WSL so I asked Codex to try to fix it and it came up with these 2 changes that it thought we should make: I'm not sure how important it is, but we probably should be bumping these versions in the upgrade version script: |
Description of Changes
The unity testsuite can now be run via
cargo testusing a Rust crate. This has also been threaded intocargo ci.We also updated the unity tests to accept an arbitrary server url instead of hardcoding one, so we can use the existing
SpacetimeDBGuard.API and ABI breaking changes
Expected complexity level and risk
2
Testing