mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Setup travis
This commit is contained in:
parent
15ac1985bb
commit
910db8d133
2 changed files with 13 additions and 0 deletions
8
.travis.yml
Normal file
8
.travis.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
language: go
|
||||
|
||||
os:
|
||||
- linux
|
||||
- windows
|
||||
|
||||
script:
|
||||
- test
|
5
test
5
test
|
@ -46,9 +46,14 @@ function run {
|
|||
baseDir="$( cd "$(dirname "$0")" && pwd )"
|
||||
cd "$baseDir"
|
||||
|
||||
# platform info
|
||||
platformInfo=$(go env GOOS GOARCH)
|
||||
echo "running tests for ${platformInfo//$'\n'/ }"
|
||||
|
||||
# get all packages
|
||||
packages=$(go list ./...)
|
||||
|
||||
# run vet/test on packages
|
||||
for package in $packages; do
|
||||
run go vet $package
|
||||
run go test -cover $package
|
||||
|
|
Loading…
Add table
Reference in a new issue