...
1name: Linux Test
2
3on:
4 push:
5 branches:
6 - "*"
7 pull_request:
8 branches:
9 - "*"
10
11jobs:
12 build:
13 strategy:
14 fail-fast: false
15 matrix:
16 go-version: ["1.18", "1.19", "1.20"]
17 runs-on: ubuntu-latest
18
19 steps:
20 - name: Set up Go
21 uses: actions/setup-go@v3
22 with:
23 go-version: ${{ matrix.go-version }}
24 id: go
25
26 - name: Check out code into the Go module directory
27 uses: actions/checkout@v3
28
29 - name: Build test binary
30 run: go test -c -race
31
32 # These tests run on Linux only. Apply capabilities and verify we can
33 # actually use real AF_PACKET sockets.
34 - name: Apply CAP_NET_RAW
35 run: sudo setcap cap_net_raw+ep ./packet.test
36
37 - name: Run tests with capabilities
38 run: ./packet.test -test.v
View as plain text