Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix suggestions, add CI step
  • Loading branch information
erikdubbelboer committed May 26, 2024
commit de8e41cee4751ddbe034b0995a44f26cda5cc0eb
21 changes: 21 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ on:

jobs:

lint:
runs-on: ubuntu-latest
strategy:
matrix:
# We make use of the `slices` feature, only available in 1.21 and newer
go-version: [ '1.21', '1.22' ]

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.56.2
args: --verbose

build:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ func benchmarkCollection_Query(b *testing.B, n int, withContent bool) {
}

if err := c.AddDocument(ctx, doc); err != nil {
b.Fatal(err)
b.Fatal("expected nil, got", err)
}
}

Expand Down
8 changes: 6 additions & 2 deletions db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ func TestDB_DeleteCollection(t *testing.T) {
}

// Delete collection
db.DeleteCollection(name) // nolint: errcheck
if err := db.DeleteCollection(name); err != nil {
t.Fatal("expected no error, got", err)
}

// Check expectations
// We don't have access to the documents field, but we can rely on DB.ListCollections()
Expand Down Expand Up @@ -426,7 +428,9 @@ func TestDB_Reset(t *testing.T) {
}

// Reset DB
db.Reset() // nolint: errcheck
if err := db.Reset(); err != nil {
t.Fatal("expected no error, got", err)
}

// Check expectations
// We don't have access to the documents field, but we can rely on DB.ListCollections()
Expand Down