Skip to content

Commit 0842310

Browse files
bfopsjoshua-spacetime
authored andcommitted
CI - Check that C# bindings are up to date (#3362)
# Description of Changes Check that our generated C# files are up-to-date in our CI. # API and ABI breaking changes None. # Expected complexity level and risk 1 # Testing - [x] CI all passes --------- Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent 07a984d commit 0842310

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/csharp-test.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ jobs:
9191
exit 1
9292
}
9393
94+
- name: Check client-api bindings are up to date
95+
working-directory: sdks/csharp
96+
run: |
97+
bash tools~/gen-client-api.sh
98+
"${GITHUB_WORKSPACE}"/tools/check-diff.sh src/SpacetimeDB/ClientApi || {
99+
echo 'Error: Client API bindings are dirty. Please run `sdks/csharp/tools~/gen-client-api.sh`.'
100+
exit 1
101+
}
102+
94103
- name: Generate client bindings
95104
working-directory: demo/Blackholio/server-rust
96105
run: bash ./generate.sh -y
@@ -116,7 +125,12 @@ jobs:
116125
disown
117126
118127
- name: Run regression tests
119-
run: bash sdks/csharp/tools~/run-regression-tests.sh
128+
run: |
129+
bash sdks/csharp/tools~/run-regression-tests.sh
130+
tools/check-diff.sh sdks/csharp/examples~/regression-tests || {
131+
echo 'Error: Bindings are dirty. Please run `sdks/csharp/tools~/gen-regression-tests.sh`.'
132+
exit 1
133+
}
120134
121135
- name: Publish unity-tests module to SpacetimeDB
122136
working-directory: demo/Blackholio/server-rust

0 commit comments

Comments
 (0)