-
Notifications
You must be signed in to change notification settings - Fork 15
56 lines (53 loc) · 1.35 KB
/
pr-tests.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Automatic Pull Request test
on:
pull_request:
branches:
- "main"
- "release*"
permissions:
contents: read
jobs:
unit-test:
name: Unit test
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.23"
- name: Set up tools
run: |
go install golang.org/x/lint/golint@latest
go install golang.org/x/tools/cmd/goimports@latest
- name: Run code checks
run: |
make check-format
make vet
- name: Set up BPF
run: |
sudo apt-get install libbpf-dev
- name: Build
run: make build-linux
- name: Unit test
run: sudo make unit-test
- name: Upload code coverage
uses: codecov/codecov-action@v3
functional-test:
name: Functional test
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.23"
- name: Set up BPF
run: |
sudo apt-get install libbpf-dev
- name: Build
run: make build-linux
- name: Functional test
run: cd test && sudo make run-test