Skip to content

Commit e1893c9

Browse files
committed
feat: add sqld to the CI environment
1 parent e6c7599 commit e1893c9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,35 @@ jobs:
1212
matrix:
1313
go-version: [ '1.20' ]
1414
os: [ubuntu-latest, macos-latest]
15+
libsql-server-release: [libsql-server-v0.24.32]
1516
runs-on: ${{ matrix.os }}
1617
steps:
1718
- uses: actions/checkout@v3
1819
- name: Set up Go
1920
uses: actions/setup-go@v3
2021
with:
2122
go-version: ${{ matrix.go-version }}
23+
24+
- name: Install sqld
25+
run: |
26+
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tursodatabase/libsql/releases/download/${{ matrix.libsql-server-release }}/libsql-server-installer.sh | sh
27+
echo "$HOME/.sqld/bin" >> $GITHUB_PATH
28+
sqld --version
29+
30+
- name: Start sqld server
31+
run: |
32+
sqld &
33+
while ! curl -s http://localhost:8080/health > /dev/null; do
34+
echo "Waiting for sqld..."
35+
sleep 1
36+
done
37+
echo "sqld is ready!"
38+
2239
- name: Build
2340
run: go build -v ./...
41+
2442
- name: Test
43+
env:
44+
LIBSQL_PRIMARY_URL: "http://localhost:8080"
45+
LIBSQL_AUTH_TOKEN: ""
2546
run: go test -v ./...

0 commit comments

Comments
 (0)