Skip to content

Commit

Permalink
tests: check for dependency leaks (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
murfffi authored Jan 24, 2025
1 parent 32851e8 commit 34d0d16
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Checks
run: |
make check_changes
make check_changes check_deps
- name: Send coverage
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ _testmain.go

vendor/
coverage/
enumerateDB
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ check_changes:
# make sure .next.version contains the intended next version
# if the following fails, update either the next version or undo any unintended api changes
go run golang.org/x/exp/cmd/gorelease@latest -version $(shell cat .next.version)

check_deps:
# checks for possibly leaked dependencies like in
# https://www.dolthub.com/blog/2022-11-07-pruning-test-dependencies-from-golang-binaries/
go build ./examples/enumerateDB.go
strings enumerateDB | grep -m 1 github.com/sclgo/impala-go # sanity
! (strings enumerateDB | grep testify)
! (strings enumerateDB | grep docker)

0 comments on commit 34d0d16

Please sign in to comment.