-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
22 lines (20 loc) · 859 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use the (faster) container-based infrastructure, see also
# http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: true
dist: bionic
language: go
go:
- "1.17"
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)"
- go vet .
- go test ./...
- go test -c github.com/sbezverk/nftableslib
- GO111MODULE="on" go build -race -a -o ./ ./cmd/e2e
- GO111MODULE="on" go build -race -a -o ./ ./cmd/concurrent
# Disable running e2e test in CI, as it constantly fails.
# Running locally proved to be successful on multiple platforms
# - sudo ./e2e