-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add circular dependency test * a bit more coverage * adjust how coverage is calculated to include top level * OpenAnyDB() can now handle "postgresql" DSNs * add description and test coverage for SkipRemainingIf * coverage tweaks in Makefile * breaking change: fix spelling of Asynchronous * bugfix: async migrations were not unlocking the migrations when finished
- Loading branch information
Showing
14 changed files
with
466 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
|
||
all: | ||
go install golang.org/x/tools/...@latest | ||
go generate | ||
go test | ||
golangci-lint run | ||
|
||
coverageO: | ||
go install github.com/eltorocorp/drygopher/drygopher@latest | ||
-drygopher -s 80 | ||
go tool cover -html=coverage.out | ||
|
||
calculate_coverage: | ||
echo "mode: atomic" > coverage.txt | ||
for d in $$(go list ./...); do \ | ||
go test -race -covermode=atomic -coverprofile=profile.out -coverpkg=github.com/muir/libschema/... $$d; \ | ||
if [ -f profile.out ]; then \ | ||
grep -v ^mode profile.out >> coverage.txt; \ | ||
rm profile.out; \ | ||
fi; \ | ||
done | ||
|
||
coverage: calculate_coverage | ||
go tool cover -html=coverage.txt | ||
|
||
golanglint: | ||
# binary will be $(go env GOPATH)/bin/golangci-lint | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.45.2 | ||
golangci-lint --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package libschema_test | ||
|
||
import( | ||
"testing" | ||
) | ||
|
||
// TestNothing exists so that there are at least some tests at the | ||
// libschema level. Without any tests, test coverage reports are not | ||
// generated. | ||
func TestNothing(t *testing.T) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.