From 50c2c02f6675e825be78945c0c544d014fa8b776 Mon Sep 17 00:00:00 2001 From: codercms Date: Sun, 17 May 2026 03:01:46 +0300 Subject: [PATCH 1/2] refactor(modules): split adapters, examples, and adapter tests into separate Go modules Move optional integrations into dedicated modules so the core package remains focused. This keeps dependency resolution scoped to each use case and clarifies module boundaries. --- .gitignore | 9 +-- README.md | 40 +++++++++---- bun_test.go => adapter_tests/bun_test.go | 14 ++++- ent_test.go => adapter_tests/ent_test.go | 6 +- adapter_tests/go.mod | 56 +++++++++++++++++++ gorm_test.go => adapter_tests/gorm_test.go | 2 +- pg_test.go => adapter_tests/pg_test.go | 2 +- pgx_test.go => adapter_tests/pgx_test.go | 4 +- sqlx_test.go => adapter_tests/sqlx_test.go | 2 +- adapter_tests/stub.go | 5 ++ {ent => adapters/ent}/functions.go | 0 adapters/ent/go.mod | 26 +++++++++ adapters/ent/test/generate.go | 3 + .../ent => adapters/ent/test}/schema/item.go | 0 adapters/pgx/go.mod | 17 ++++++ {pgx => adapters/pgx}/halfvec.go | 0 {pgx => adapters/pgx}/register.go | 0 {pgx => adapters/pgx}/sparsevec.go | 0 {pgx => adapters/pgx}/vector.go | 0 examples/citus/main.go | 2 +- examples/disco/main.go | 2 +- examples/go.mod | 7 +++ examples/hybrid/main.go | 2 +- examples/loading/main.go | 2 +- examples/openai/main.go | 2 +- examples/sparse/main.go | 2 +- go.mod | 49 ---------------- go.work | 9 +++ test/ent/generate.go | 3 - 29 files changed, 183 insertions(+), 83 deletions(-) rename bun_test.go => adapter_tests/bun_test.go (94%) rename ent_test.go => adapter_tests/ent_test.go (96%) create mode 100644 adapter_tests/go.mod rename gorm_test.go => adapter_tests/gorm_test.go (98%) rename pg_test.go => adapter_tests/pg_test.go (99%) rename pgx_test.go => adapter_tests/pgx_test.go (98%) rename sqlx_test.go => adapter_tests/sqlx_test.go (98%) create mode 100644 adapter_tests/stub.go rename {ent => adapters/ent}/functions.go (100%) create mode 100644 adapters/ent/go.mod create mode 100644 adapters/ent/test/generate.go rename {test/ent => adapters/ent/test}/schema/item.go (100%) create mode 100644 adapters/pgx/go.mod rename {pgx => adapters/pgx}/halfvec.go (100%) rename {pgx => adapters/pgx}/register.go (100%) rename {pgx => adapters/pgx}/sparsevec.go (100%) rename {pgx => adapters/pgx}/vector.go (100%) create mode 100644 examples/go.mod create mode 100644 go.work delete mode 100644 test/ent/generate.go diff --git a/.gitignore b/.gitignore index 50c6897..2bddb0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ -/go.sum -/test/ent/* -!/test/ent/generate.go -!/test/ent/schema +go.sum +go.work.sum +/adapters/ent/test/* +!/adapters/ent/test/generate.go +!/adapters/ent/test/schema diff --git a/README.md b/README.md index 4a212e8..84b42ba 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,16 @@ Run: go get github.com/pgvector/pgvector-go ``` +Install adapter modules only when needed: + +```sh +# pgx adapter +go get github.com/pgvector/pgvector-go/adapters/pgx + +# ent helpers +go get github.com/pgvector/pgvector-go/adapters/ent +``` + And follow the instructions for your database library: - [pgx](#pgx) @@ -40,7 +50,7 @@ Import the packages ```go import ( "github.com/pgvector/pgvector-go" - pgxvec "github.com/pgvector/pgvector-go/pgx" + pgxvec "github.com/pgvector/pgvector-go/adapters/pgx" ) ``` @@ -92,7 +102,7 @@ _, err := conn.Exec(ctx, "CREATE INDEX ON items USING ivfflat (embedding vector_ Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance -See a [full example](pgx_test.go) +See a [full example](adapter_tests/pgx_test.go) ## pg @@ -145,7 +155,7 @@ _, err := conn.Exec(ctx, "CREATE INDEX ON items USING ivfflat (embedding vector_ Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance -See a [full example](pg_test.go) +See a [full example](adapter_tests/pg_test.go) ## Bun @@ -207,7 +217,7 @@ func (*Item) AfterCreateTable(ctx context.Context, query *bun.CreateTableQuery) Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance -See a [full example](bun_test.go) +See a [full example](adapter_tests/bun_test.go) ## Ent @@ -216,7 +226,7 @@ Import the package ```go import ( "github.com/pgvector/pgvector-go" - entvec "github.com/pgvector/pgvector-go/ent" + entvec "github.com/pgvector/pgvector-go/adapters/ent" ) ``` @@ -278,7 +288,7 @@ func (Item) Indexes() []ent.Index { Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance -See a [full example](ent_test.go) +See a [full example](adapter_tests/ent_test.go) ## GORM @@ -330,7 +340,7 @@ db.Exec("CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH (lis Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance -See a [full example](gorm_test.go) +See a [full example](adapter_tests/gorm_test.go) ## sqlx @@ -380,7 +390,7 @@ db.MustExec("CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH Use `vector_ip_ops` for inner product and `vector_cosine_ops` for cosine distance -See a [full example](sqlx_test.go) +See a [full example](adapter_tests/sqlx_test.go) ## Reference @@ -472,14 +482,22 @@ To get started with development: git clone https://github.com/pgvector/pgvector-go.git cd pgvector-go go mod tidy +(cd adapters/pgx && go mod tidy) +(cd adapters/ent && go mod tidy) +(cd examples && go mod tidy) +(cd adapter_tests && go mod tidy) createdb pgvector_go_test -go generate ./test/ent -go test -v +(cd ./adapters/ent && go generate ./test) +go test ./... +(cd adapters/pgx && go test ./...) +(cd adapters/ent && go test ./...) +(cd adapter_tests && go test ./...) ``` To run an example: ```sh createdb pgvector_example -go run ./examples/loading +cd examples +go run ./loading ``` diff --git a/bun_test.go b/adapter_tests/bun_test.go similarity index 94% rename from bun_test.go rename to adapter_tests/bun_test.go index e7572b6..5678486 100644 --- a/bun_test.go +++ b/adapter_tests/bun_test.go @@ -1,4 +1,4 @@ -package pgvector_test +package adapter_tests_test import ( "context" @@ -14,6 +14,16 @@ import ( "github.com/uptrace/bun/driver/pgdriver" ) +func pgUser() string { + if user := os.Getenv("PGUSER"); user != "" { + return user + } + if user := os.Getenv("USER"); user != "" { + return user + } + return "postgres" +} + type BunItem struct { bun.BaseModel `bun:"table:bun_items"` @@ -73,7 +83,7 @@ func TestBun(t *testing.T) { pgconn := pgdriver.NewConnector( pgdriver.WithDatabase("pgvector_go_test"), - pgdriver.WithUser(os.Getenv("USER")), + pgdriver.WithUser(pgUser()), pgdriver.WithTLSConfig(nil), // sslmode=disable ) sqldb := sql.OpenDB(pgconn) diff --git a/ent_test.go b/adapter_tests/ent_test.go similarity index 96% rename from ent_test.go rename to adapter_tests/ent_test.go index 5fe12f9..68fee4d 100644 --- a/ent_test.go +++ b/adapter_tests/ent_test.go @@ -1,4 +1,4 @@ -package pgvector_test +package adapter_tests_test import ( "context" @@ -8,8 +8,8 @@ import ( "entgo.io/ent/dialect/sql" _ "github.com/lib/pq" "github.com/pgvector/pgvector-go" - entvec "github.com/pgvector/pgvector-go/ent" - "github.com/pgvector/pgvector-go/test/ent" + entvec "github.com/pgvector/pgvector-go/adapters/ent" + ent "github.com/pgvector/pgvector-go/adapters/ent/test" ) func TestEnt(t *testing.T) { diff --git a/adapter_tests/go.mod b/adapter_tests/go.mod new file mode 100644 index 0000000..eb7ab22 --- /dev/null +++ b/adapter_tests/go.mod @@ -0,0 +1,56 @@ +module github.com/pgvector/pgvector-go/adapter_tests + +go 1.23.0 + +replace github.com/pgvector/pgvector-go/adapters/ent => ../adapters/ent + +replace github.com/pgvector/pgvector-go/adapters/pgx => ../adapters/pgx + +require ( + entgo.io/ent v0.14.3 + github.com/go-pg/pg/v10 v10.11.0 + github.com/jackc/pgx/v5 v5.7.2 + github.com/jmoiron/sqlx v1.3.5 + github.com/lib/pq v1.10.9 + github.com/pgvector/pgvector-go v0.3.0 + github.com/pgvector/pgvector-go/adapters/ent v0.0.0 + github.com/pgvector/pgvector-go/adapters/pgx v0.0.0 + github.com/uptrace/bun v1.1.12 + github.com/uptrace/bun/dialect/pgdialect v1.1.12 + github.com/uptrace/bun/driver/pgdriver v1.1.12 + gorm.io/driver/postgres v1.5.4 + gorm.io/gorm v1.25.5 +) + +require ( + ariga.io/atlas v0.32.0 // indirect + github.com/agext/levenshtein v1.2.3 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/bmatcuk/doublestar v1.3.4 // indirect + github.com/go-openapi/inflect v0.21.0 // indirect + github.com/go-pg/zerochecker v0.2.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/hcl/v2 v2.23.0 // indirect + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/jackc/puddle/v2 v2.2.2 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect + github.com/vmihailenco/bufpool v0.1.11 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser v0.1.2 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + github.com/zclconf/go-cty v1.16.2 // indirect + github.com/zclconf/go-cty-yaml v1.1.0 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/text v0.23.0 // indirect + golang.org/x/tools v0.31.0 // indirect + mellium.im/sasl v0.3.1 // indirect +) diff --git a/gorm_test.go b/adapter_tests/gorm_test.go similarity index 98% rename from gorm_test.go rename to adapter_tests/gorm_test.go index 5b22e86..f811a45 100644 --- a/gorm_test.go +++ b/adapter_tests/gorm_test.go @@ -1,4 +1,4 @@ -package pgvector_test +package adapter_tests_test import ( "math" diff --git a/pg_test.go b/adapter_tests/pg_test.go similarity index 99% rename from pg_test.go rename to adapter_tests/pg_test.go index 92de456..5b72dfc 100644 --- a/pg_test.go +++ b/adapter_tests/pg_test.go @@ -1,4 +1,4 @@ -package pgvector_test +package adapter_tests_test import ( "math" diff --git a/pgx_test.go b/adapter_tests/pgx_test.go similarity index 98% rename from pgx_test.go rename to adapter_tests/pgx_test.go index 44048fe..88268b6 100644 --- a/pgx_test.go +++ b/adapter_tests/pgx_test.go @@ -1,4 +1,4 @@ -package pgvector_test +package adapter_tests_test import ( "context" @@ -10,7 +10,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/jackc/pgx/v5/pgxpool" "github.com/pgvector/pgvector-go" - pgxvec "github.com/pgvector/pgvector-go/pgx" + pgxvec "github.com/pgvector/pgvector-go/adapters/pgx" ) type PgxItem struct { diff --git a/sqlx_test.go b/adapter_tests/sqlx_test.go similarity index 98% rename from sqlx_test.go rename to adapter_tests/sqlx_test.go index 7f2e6ab..9cf6f24 100644 --- a/sqlx_test.go +++ b/adapter_tests/sqlx_test.go @@ -1,4 +1,4 @@ -package pgvector_test +package adapter_tests_test import ( "reflect" diff --git a/adapter_tests/stub.go b/adapter_tests/stub.go new file mode 100644 index 0000000..92774a5 --- /dev/null +++ b/adapter_tests/stub.go @@ -0,0 +1,5 @@ +package adapter_tests + +func stub() { + // Empty stub +} diff --git a/ent/functions.go b/adapters/ent/functions.go similarity index 100% rename from ent/functions.go rename to adapters/ent/functions.go diff --git a/adapters/ent/go.mod b/adapters/ent/go.mod new file mode 100644 index 0000000..68c1e03 --- /dev/null +++ b/adapters/ent/go.mod @@ -0,0 +1,26 @@ +module github.com/pgvector/pgvector-go/adapters/ent + +go 1.23.0 + +require ( + entgo.io/ent v0.14.3 + github.com/pgvector/pgvector-go v0.3.0 +) + +require ( + ariga.io/atlas v0.32.0 // indirect + github.com/agext/levenshtein v1.2.3 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect + github.com/bmatcuk/doublestar v1.3.4 // indirect + github.com/go-openapi/inflect v0.21.0 // indirect + github.com/google/go-cmp v0.7.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/hcl/v2 v2.23.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.1 // indirect + github.com/zclconf/go-cty v1.16.2 // indirect + github.com/zclconf/go-cty-yaml v1.1.0 // indirect + golang.org/x/mod v0.24.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/text v0.23.0 // indirect + golang.org/x/tools v0.31.0 // indirect +) diff --git a/adapters/ent/test/generate.go b/adapters/ent/test/generate.go new file mode 100644 index 0000000..7a221a1 --- /dev/null +++ b/adapters/ent/test/generate.go @@ -0,0 +1,3 @@ +package test + +//go:generate go run entgo.io/ent/cmd/ent generate --feature sql/execquery ./schema diff --git a/test/ent/schema/item.go b/adapters/ent/test/schema/item.go similarity index 100% rename from test/ent/schema/item.go rename to adapters/ent/test/schema/item.go diff --git a/adapters/pgx/go.mod b/adapters/pgx/go.mod new file mode 100644 index 0000000..326dfe0 --- /dev/null +++ b/adapters/pgx/go.mod @@ -0,0 +1,17 @@ +module github.com/pgvector/pgvector-go/adapters/pgx + +go 1.23.0 + +require ( + github.com/jackc/pgx/v5 v5.7.2 + github.com/pgvector/pgvector-go v0.3.0 + github.com/x448/float16 v0.8.4 +) + +require ( + github.com/jackc/pgpassfile v1.0.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect + github.com/stretchr/testify v1.8.2 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/text v0.23.0 // indirect +) diff --git a/pgx/halfvec.go b/adapters/pgx/halfvec.go similarity index 100% rename from pgx/halfvec.go rename to adapters/pgx/halfvec.go diff --git a/pgx/register.go b/adapters/pgx/register.go similarity index 100% rename from pgx/register.go rename to adapters/pgx/register.go diff --git a/pgx/sparsevec.go b/adapters/pgx/sparsevec.go similarity index 100% rename from pgx/sparsevec.go rename to adapters/pgx/sparsevec.go diff --git a/pgx/vector.go b/adapters/pgx/vector.go similarity index 100% rename from pgx/vector.go rename to adapters/pgx/vector.go diff --git a/examples/citus/main.go b/examples/citus/main.go index 373ee2e..7b3b66b 100644 --- a/examples/citus/main.go +++ b/examples/citus/main.go @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/pgvector/pgvector-go" - pgxvector "github.com/pgvector/pgvector-go/pgx" + pgxvector "github.com/pgvector/pgvector-go/adapters/pgx" ) func main() { diff --git a/examples/disco/main.go b/examples/disco/main.go index cb64a8a..3a72b19 100644 --- a/examples/disco/main.go +++ b/examples/disco/main.go @@ -7,7 +7,7 @@ import ( "github.com/ankane/disco-go" "github.com/jackc/pgx/v5" "github.com/pgvector/pgvector-go" - pgxvector "github.com/pgvector/pgvector-go/pgx" + pgxvector "github.com/pgvector/pgvector-go/adapters/pgx" ) func main() { diff --git a/examples/go.mod b/examples/go.mod new file mode 100644 index 0000000..d92b6aa --- /dev/null +++ b/examples/go.mod @@ -0,0 +1,7 @@ +module github.com/pgvector/pgvector-go/examples + +go 1.23.0 + +replace github.com/pgvector/pgvector-go/adapters/ent => ../adapters/ent + +replace github.com/pgvector/pgvector-go/adapters/pgx => ../adapters/pgx diff --git a/examples/hybrid/main.go b/examples/hybrid/main.go index 74fedb6..45fb9b3 100644 --- a/examples/hybrid/main.go +++ b/examples/hybrid/main.go @@ -9,7 +9,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/pgvector/pgvector-go" - pgxvector "github.com/pgvector/pgvector-go/pgx" + pgxvector "github.com/pgvector/pgvector-go/adapters/pgx" ) func main() { diff --git a/examples/loading/main.go b/examples/loading/main.go index 95f20aa..3a0b14e 100644 --- a/examples/loading/main.go +++ b/examples/loading/main.go @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/pgvector/pgvector-go" - pgxvector "github.com/pgvector/pgvector-go/pgx" + pgxvector "github.com/pgvector/pgvector-go/adapters/pgx" ) func main() { diff --git a/examples/openai/main.go b/examples/openai/main.go index e6608ba..0d0c413 100644 --- a/examples/openai/main.go +++ b/examples/openai/main.go @@ -10,7 +10,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/pgvector/pgvector-go" - pgxvector "github.com/pgvector/pgvector-go/pgx" + pgxvector "github.com/pgvector/pgvector-go/adapters/pgx" ) func main() { diff --git a/examples/sparse/main.go b/examples/sparse/main.go index c3affb5..15c9634 100644 --- a/examples/sparse/main.go +++ b/examples/sparse/main.go @@ -16,7 +16,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/pgvector/pgvector-go" - pgxvector "github.com/pgvector/pgvector-go/pgx" + pgxvector "github.com/pgvector/pgvector-go/adapters/pgx" ) func main() { diff --git a/go.mod b/go.mod index 3898b35..29fa7e2 100644 --- a/go.mod +++ b/go.mod @@ -1,52 +1,3 @@ module github.com/pgvector/pgvector-go go 1.23.0 - -require ( - entgo.io/ent v0.14.3 - github.com/ankane/disco-go v0.1.2 - github.com/go-pg/pg/v10 v10.11.0 - github.com/jackc/pgx/v5 v5.7.2 - github.com/jmoiron/sqlx v1.3.5 - github.com/lib/pq v1.10.9 - github.com/uptrace/bun v1.1.12 - github.com/uptrace/bun/dialect/pgdialect v1.1.12 - github.com/uptrace/bun/driver/pgdriver v1.1.12 - github.com/x448/float16 v0.8.4 - gorm.io/driver/postgres v1.5.4 - gorm.io/gorm v1.25.5 -) - -require ( - ariga.io/atlas v0.32.0 // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/bmatcuk/doublestar v1.3.4 // indirect - github.com/go-openapi/inflect v0.21.0 // indirect - github.com/go-pg/zerochecker v0.2.0 // indirect - github.com/google/go-cmp v0.7.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/hashicorp/hcl/v2 v2.23.0 // indirect - github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect - github.com/jackc/puddle/v2 v2.2.2 // indirect - github.com/jinzhu/inflection v1.0.0 // indirect - github.com/jinzhu/now v1.1.5 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/rogpeppe/go-internal v1.9.0 // indirect - github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect - github.com/vmihailenco/bufpool v0.1.11 // indirect - github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect - github.com/vmihailenco/tagparser v0.1.2 // indirect - github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect - github.com/zclconf/go-cty v1.16.2 // indirect - github.com/zclconf/go-cty-yaml v1.1.0 // indirect - golang.org/x/crypto v0.36.0 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/sync v0.12.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/text v0.23.0 // indirect - golang.org/x/tools v0.31.0 // indirect - golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect - mellium.im/sasl v0.3.1 // indirect -) diff --git a/go.work b/go.work new file mode 100644 index 0000000..70a2ae6 --- /dev/null +++ b/go.work @@ -0,0 +1,9 @@ +go 1.23.0 + +use ( + . + ./adapter_tests + ./adapters/ent + ./adapters/pgx + ./examples +) diff --git a/test/ent/generate.go b/test/ent/generate.go deleted file mode 100644 index 78925ee..0000000 --- a/test/ent/generate.go +++ /dev/null @@ -1,3 +0,0 @@ -package ent - -//go:generate go run -mod=mod entgo.io/ent/cmd/ent generate --feature sql/execquery ./schema From 282551324d0808d9ce01fbcb1824824519b9f836 Mon Sep 17 00:00:00 2001 From: codercms Date: Sun, 17 May 2026 03:14:25 +0300 Subject: [PATCH 2/2] chore(ci): Update to the new repo structure --- .github/workflows/build.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b43da4..e7b7f65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,12 @@ jobs: with: go-version: ${{ matrix.go }} cache: false # depends on go.sum - - run: go mod tidy + - run: | + go mod tidy + (cd adapters/pgx && go mod tidy) + (cd adapters/ent && go mod tidy) + (cd examples && go mod tidy) + (cd adapter_tests && go mod tidy) - uses: ankane/setup-postgres@v1 with: database: pgvector_go_test @@ -24,5 +29,9 @@ jobs: cd pgvector make sudo make install - - run: go generate ./test/ent && go mod tidy - - run: go test -v + - run: (cd adapters/ent && go generate ./test && go mod tidy) + - run: go test -v ./... + - run: (cd adapters/pgx && go test -v ./...) + - run: (cd adapters/ent && go test -v ./...) + - run: (cd examples && go test -v ./...) + - run: (cd adapter_tests && go test -v ./...)