name: go on: push: branches: - main pull_request: branches: - main jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Set up Go 1.x uses: actions/setup-go@v2 with: go-version: ^1.16 id: go - name: Install libpcap-dev run: sudo apt-get install libpcap-dev - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Go fmt run: go fmt ./... - name: Go vet run: go vet ./... - name: Test run: go test -race -v ./... - name: Build run: go build -v ./cmd/...