Skip to content

Commit 2dd2d3a

Browse files
committed
[bfops/check-bindings]: check bindings are
1 parent ca66340 commit 2dd2d3a

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/csharp-test.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ jobs:
7676
# Share the target directory with our local project to avoid rebuilding same SpacetimeDB crates twice.
7777
CARGO_TARGET_DIR: demo/Blackholio/server-rust/target
7878

79+
- name: Check quickstart-chat bindings are up to date
80+
working-directory: sdks/csharp/examples~/quickstart-chat
81+
run: |
82+
spacetime generate --lang csharp --out-dir client/module_bindings --project-path server
83+
# This was copied from tools/check-diff.sh.
84+
# It's required because `spacetime generate` creates lines with the SpacetimeDB commit
85+
# version, which would make this `git diff` check very brittle if included.
86+
PATTERN='^// This was generated using spacetimedb cli version.*'
87+
git diff --exit-code --ignore-matching-lines="$PATTERN" -- . || {
88+
echo "Error: Bindings have changed. Please generate bindings again and commit them to this branch."
89+
exit 1
90+
}
91+
7992
- name: Generate client bindings
8093
working-directory: demo/Blackholio/server-rust
8194
run: bash ./generate.sh -y

0 commit comments

Comments
 (0)