You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding this RFC on behalf of @jduclos-bellese - we'd like to get feedback about whether we could add a go-unit-tests hook to this project. We could implement the hook similar to the go-unit-tests hook found in dnephin/pre-commit-golang, which executes a bash script like this:
#!/usr/bin/env bash
FILES=$(go list ./... | grep -v /vendor/)
go test -tags=unit -timeout 30s -short -v ${FILES}
returncode=$?if [ $returncode-ne 0 ];thenecho"unit tests failed"exit 1
fi
The text was updated successfully, but these errors were encountered:
This example script is pretty opinionated. We should decide if it's the opinion we want to enforce or if there's a better way to allow configuration on how to run tests. There's only a few issues on the original project but one already asks for a different way to do tests: dnephin/pre-commit-golang#49
This suggests all tests to be tagged unit via Build Constraints. What if a project does not tag their tests? Or already uses another tag for managing tests?
If there really is a good "standard" for tests, we could drive towards that but I think, generally, any implementation may end up being too opinionated, and therefore, unused.
Adding this RFC on behalf of @jduclos-bellese - we'd like to get feedback about whether we could add a
go-unit-tests
hook to this project. We could implement the hook similar to thego-unit-tests
hook found in dnephin/pre-commit-golang, which executes abash
script like this:The text was updated successfully, but these errors were encountered: