Skip to content

Commit d176c2d

Browse files
committed
ci: Build sqld from PR branch in golang-bindings test
The golang-bindings workflow was using ghcr.io/tursodatabase/libsql-server:latest which is built from main branch. This caused protocol mismatches when testing Hyper 1.0 migration PRs. Now the workflow builds sqld from the PR branch and runs it directly, ensuring client and server versions match.
1 parent 4d87075 commit d176c2d

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

.github/workflows/golang-bindings.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ jobs:
1616

1717
runs-on: ubuntu-latest
1818

19-
services:
20-
sqld:
21-
image: ghcr.io/tursodatabase/libsql-server:latest
22-
ports:
23-
- 8080:8080
24-
2519
steps:
2620
- uses: actions/checkout@v3
2721

@@ -57,6 +51,9 @@ jobs:
5751
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
5852
restore-keys: ${{ runner.os }}-cargo-
5953

54+
- name: Build sqld server
55+
run: cargo build --release -p libsql-server
56+
6057
- name: Build sql-experimental
6158
run: cargo b -j16 --release -p sql-experimental
6259

@@ -73,6 +70,19 @@ jobs:
7370
&& cp target/release/libsql_experimental.a go-libsql/lib/linux_arm64/
7471
&& cp bindings/c/include/libsql.h go-libsql/lib/include/
7572

73+
- name: Start sqld server
74+
run: |
75+
./target/release/sqld --http-listen-addr 127.0.0.1:8080 &
76+
# Wait for server to be ready
77+
for i in {1..30}; do
78+
if curl -s http://127.0.0.1:8080/health > /dev/null 2>&1; then
79+
echo "Server is ready!"
80+
break
81+
fi
82+
echo "Waiting for server... ($i/30)"
83+
sleep 1
84+
done
85+
7686
- name: Run go-libsql tests
7787
working-directory: go-libsql
7888
run: go test -v -count=1 ./...

0 commit comments

Comments
 (0)