Merge pull request #226 from eliben/sanitytest

Adding a basic sanity testing tool to run during 'build'.
This commit is contained in:
Mark McGranaghan 2019-05-30 12:50:03 -07:00 committed by GitHub
commit 4ab97fb99b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -2,6 +2,7 @@
set -e
tools/test
tools/format
tools/measure
tools/generate

10
tools/test Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Sanity testing of the examples.
set -eo pipefail
# go vet will attempt to build each example, making sure it compiles. It will
# also report known issues with the code. Disabling the -unreachable check
# because it will fire false positives for some examples demonstrating panics.
go vet -unreachable=false ./examples/...