Skip to content

Merge pull request #127 from tursodatabase/improve_batch #167

Merge pull request #127 from tursodatabase/improve_batch

Merge pull request #127 from tursodatabase/improve_batch #167

Workflow file for this run

name: Build and test
on:
push:
branches: [main]
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.20', '>=1.21' ]
services:
sqld:
image: ghcr.io/tursodatabase/libsql-server:latest
ports:
- 8080:8080
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: "go.mod"
cache: true
go-version: ${{ matrix.go }}
- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
- name: Install dependencies
run: go get ./...
- name: Vet
run: go vet -v $(go list ./... | grep -v "github.com/tursodatabase/libsql-client-go/sqliteparser$")
- name: Install sqlclosecheck
run: go install github.com/ryanrolds/sqlclosecheck@latest
- name: sqlclosecheck
run: go vet -vettool=${HOME}/go/bin/sqlclosecheck ./...
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -parallel 1 ./...
env:
LIBSQL_TEST_HTTP_DB_URL: "http://127.0.0.1:8080"
LIBSQL_TEST_WS_DB_URL: "ws://127.0.0.1:8080"