-
Notifications
You must be signed in to change notification settings - Fork 742
57 lines (57 loc) · 1.96 KB
/
pr-automated-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
57
name: Automatic Pull Request test
on:
pull_request:
branches:
- "master"
- "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@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # refs/tags/v5.0.1
with:
go-version: "1.22"
- name: Set up tools
run: |
go install golang.org/x/lint/golint@latest
go install golang.org/x/tools/cmd/goimports@latest
# Install ginkgo version from go.mod
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
- name: Run code checks
run: |
make check-format
make vet
- name: Build
run: make build-linux
- name: Build tests
run: make build-test-binaries
- name: Helm lint
run: make helm-lint
- name: Unit test
run: make unit-test
- name: Upload code coverage
uses: codecov/codecov-action@79066c46f8dcdf8d7355f820dbac958c5b4cb9d3 # refs/tags/v4.5.0
docker-build:
name: Build Docker images
runs-on: ubuntu-latest
steps:
- name: Checkout latest commit in the PR
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # refs/tags/v4.1.7
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # refs/tags/v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # refs/tags/v3.3.0
- name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # refs/tags/v5.0.1
with:
go-version: "1.22"
- name: Build CNI images
run: make multi-arch-cni-build
- name: Build CNI Init images
run: make multi-arch-cni-init-build