Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#/Unity SDK Testsuite #3

Merged
merged 7 commits into from
Dec 12, 2024
Merged

Conversation

jdetter
Copy link
Collaborator

@jdetter jdetter commented Oct 30, 2024

Description

We're moving the Unity code from the C#/Unity testsuite here to prevent duplication of the circle game project.

This testsuite works against this specific revision of SpacetimeDB: 0935b7346b825b8cbb9f36d9ed256136b73b5f0b

Testing

Testsuite passes:

image

If you want to double-check my work, you can:

cd SpacetimeDB
git checkout 0935b7346b825b8cbb9f36d9ed256136b73b5f0b
cargo install --path ./crates/cli
cd ../SpacetimeDBCircleGame/server
bash ./generate.sh
bash ./publish.sh

Merging notes

You'll have to wait for 1.0.0 to release before merging this, and make sure you update the package before merging. You just have to hit the update button in the package manager and commit the package.lock change

image

@jdetter jdetter marked this pull request as ready for review October 30, 2024 23:07
John Detter added 2 commits October 31, 2024 00:30
client/.gitignore Outdated Show resolved Hide resolved
server/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

Left two comments.

Centril pushed a commit to clockworklabs/com.clockworklabs.spacetimedbsdk that referenced this pull request Oct 31, 2024
**Please do not rebase this PR**

## Description of Changes
*Describe what has been changed, any new features or bug fixes*

This is very similar to
#176
except it imports the circle game as a submodule instead of copying the
code over into this repo. This is the SpacetimeDBCircleGame PR that
we're dependent on right now:
clockworklabs/SpacetimeDBCircleGame#3

- This PR introduces a testsuite which runs in Unity. Right now it just
spawns in a circle, eats some food and verifies the decay logic is
working correctly. I've also written some reconnection tests but they
don't work because reconnections are currently broken. There are also
one-off tests but those don't work either because they also require
reconnections to be working.

Update: reconnections have been fixed via
#168.

I've used the built-in unity testsuite framework to achieve this, along
with the UnityCI tool from GameCI. The documentation for this docker
container can be found here:
https://game.ci/docs/github/getting-started/

## API

 - [ ] This is an API breaking change to the SDK

*If the API is breaking, please state below what will break*

Not breaking

## Requires SpacetimeDB PRs
*List any PRs here that are required for this SDK change to work*

None

## Testsuite

SpacetimeDB branch name: 0935b7346b825b8cbb9f36d9ed256136b73b5f0b

## Testing
*Write instructions for a test that you performed for this PR*

- [x] The testsuite is passing:
https://github.com/clockworklabs/com.clockworklabs.spacetimedbsdk/actions/runs/11604456943/job/32313229775

You can follow test instructions here to double check my work:
clockworklabs/SpacetimeDBCircleGame#3

## Follow-up Actions

- [ ] Rebase the reconnection logic PR onto this PR and re-enable the
reconnection tests

---------

Co-authored-by: John Detter <no-reply@boppygames.gg>
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

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

This now LGTM

@cloutiertyler cloutiertyler merged commit 87d39a4 into master Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants