forked from florianl/go-nflog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
35 lines (30 loc) · 1.07 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
language: go
go:
- "1.9"
- "1.10"
- "1.11.x"
- master
os:
- linux
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo modprobe nfnetlink_log ; fi
- go get golang.org/x/lint/golint
- go get -d ./...
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ip6tables -I OUTPUT -p ipv6-icmp -j NFLOG --nflog-group 100 ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo iptables -I OUTPUT -p icmp -j NFLOG --nflog-group 100 ; fi
script:
- go vet ./...
- golint -set_exit_status ./...
- go test -v -race ./...
- go test -c -tags integration .
- |
ping6 -c 10 -i 2 2606:4700:4700::1111 &
export PING6_PID=$!
- |
ping -c 10 -i 2 1.1.1.1 &
export PING4_PID=$!
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo ./go-nflog.test -test.v ; fi
- if [[ $(ps cax | grep $PING4_PID) ]]; then kill -9 $PING4_PID ; fi
- if [[ $(ps cax | grep $PING6_PID) ]]; then kill -9 $PING6_PID ; fi