-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (56 loc) · 1.87 KB
/
go.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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: PreCommit Check
on:
push:
branches: [ "main" ]
tags:
- v*
pull_request:
branches: [ "main" ]
jobs:
golangci-lint:
name: ci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
with:
version: latest
unit-tests:
name: Run unit unit-tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare environment
run: docker run --rm --name cello-test -d --privileged -v $(pwd):/cello -v /go/pkg/mod:/go/pkg/mod -v /go/cache:/go/cache -w /cello docker.io/library/golang:latest sleep infinity
- run: docker exec cello-test bash -c "apt-get update && apt-get install -y iproute2"
- run: docker exec cello-test go install github.com/containernetworking/plugins/plugins/ipam/host-local@v1.2.0
- run: docker exec cello-test sysctl -w net.ipv6.conf.all.disable_ipv6=0
- run: docker exec cello-test ip addr add FEF6:BDFE:7654:593F:9721:20B0:C3C3:1A66/10 dev eth0
- run: docker exec cello-test ip route add default via FEF6:BDFE:7654:593F::1
- name: Run unit tests
run: docker exec cello-test make test
build:
name: Build binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: ./go.mod
- name: Mod tidy
run: go mod tidy
- name: Build cello-agent
run: make cello-agent
- name: Build cello-cni
run: make cello-cni
- name: Build cello-cli
run: make cello-ctl
- name: Build cilium-launcher
run: make cilium-launcher