Skip to content

Commit 9ab3116

Browse files
committed
update github ci to use sqlean for testing
1 parent 38b8efe commit 9ab3116

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,26 @@ jobs:
4242
done
4343
echo "sqld is ready!"
4444
45+
- name: Install sqlean
46+
run: |
47+
SQLEAN_VERSION=0.27.2
48+
case "${{ runner.os }}" in
49+
Linux) OS_SLUG=linux-amd64 ;;
50+
macOS) OS_SLUG=darwin-amd64 ;;
51+
esac
52+
curl -sL https://github.com/nalgeon/sqlean/releases/download/${SQLEAN_VERSION}/sqlean-${OS_SLUG}.tar.gz | tar xz
53+
echo "$PWD/bin" >> $GITHUB_PATH
54+
sqlean --version
55+
56+
- name: Set extension env
57+
run: |
58+
case "${{ runner.os }}" in
59+
Linux) ext=bin/sqlean.so ;;
60+
macOS) ext=bin/sqlean.dylib ;;
61+
esac
62+
echo "LIBSQL_TEST_EXTENSION=$PWD/$ext" >> $GITHUB_ENV
63+
echo "LIBSQL_TEST_EXTENSION_ENTRY=sqlite3_extension_init" >> $GITHUB_ENV
64+
4565
- name: Build
4666
run: go build -v ./...
4767

libsql_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ func TestLoadExtension_Existing(t *testing.T) {
13851385
}
13861386
defer sqlConn.Close()
13871387

1388-
err = sqlConn.Raw(func(driverConn interface{}) error {
1388+
err = sqlConn.Raw(func(driverConn any) error {
13891389
cImpl, ok := driverConn.(*conn)
13901390
if !ok {
13911391
return fmt.Errorf("unexpected driverConn type %T", driverConn)
@@ -1412,7 +1412,7 @@ func TestLoadExtension_Nonexistent(t *testing.T) {
14121412
}
14131413
defer sqlConn.Close()
14141414

1415-
err = sqlConn.Raw(func(driverConn interface{}) error {
1415+
err = sqlConn.Raw(func(driverConn any) error {
14161416
cImpl, ok := driverConn.(*conn)
14171417
if !ok {
14181418
return fmt.Errorf("unexpected driverConn type %T", driverConn)

0 commit comments

Comments
 (0)