2018-06-08 10:19:37 -05:00
|
|
|
# Use the (faster) container-based infrastructure, see also
|
|
|
|
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
|
2019-01-28 22:56:40 -06:00
|
|
|
sudo: true
|
2018-06-08 10:19:37 -05:00
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
language: go
|
|
|
|
go:
|
2019-12-20 10:57:27 -06:00
|
|
|
- "1.13"
|
2018-06-08 10:19:37 -05:00
|
|
|
|
|
|
|
script:
|
|
|
|
# Check whether files are syntactically correct.
|
|
|
|
- "gofmt -l $(find . -name '*.go' | tr '\\n' ' ') >/dev/null"
|
|
|
|
# Check whether files were not gofmt'ed.
|
|
|
|
- "gosrc=$(find . -name '*.go' | tr '\\n' ' '); [ $(gofmt -l $gosrc 2>&- | wc -l) -eq 0 ] || (echo 'gofmt was not run on these files:'; gofmt -l $gosrc 2>&-; false)"
|
2019-12-20 11:00:14 -06:00
|
|
|
- go vet .
|
2018-06-08 10:19:37 -05:00
|
|
|
- go test ./...
|
2019-01-28 22:56:40 -06:00
|
|
|
- go test -c github.com/google/nftables
|
|
|
|
- sudo ./nftables.test -test.v -run_system_tests
|