-
Notifications
You must be signed in to change notification settings - Fork 97
43 lines (34 loc) · 1.04 KB
/
linux-integration-test.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
36
37
38
39
40
41
42
43
name: Linux Integration Test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
strategy:
matrix:
go-version: ["1.18", "1.19", "1.20"]
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Create a network namespace for privileged tests
run: sudo ip netns add unpriv0
- name: Build netlink test binary for privileged tests
run: go test -c -race .
- name: Run privileged netlink tests
run: sudo ./netlink.test -test.v -test.run TestIntegration*
- name: Build integration test binary for privileged tests
working-directory: ./internal/integration
run: go test -c -race .
- name: Run privileged integration tests
working-directory: ./internal/integration
run: sudo ./integration.test -test.v