-
Notifications
You must be signed in to change notification settings - Fork 16
48 lines (45 loc) · 1.1 KB
/
ci.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
44
45
46
47
48
---
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.20.x
- run: go mod tidy -v
- name: "Check for changes in go.mod"
run: |
git diff --name-only --exit-code go.mod || ( git diff && echo "Run go tidy to update go.mod" && false )
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.20.x
- run: go mod download
- name: "Compile Go code"
run: |
go build -v ./...
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Enable VRF kernel module"
run: |
sudo apt-get update && \
sudo apt-get install -y linux-modules-extra-$(uname -r) && \
sudo modprobe -v vrf || ( echo >&2 "FAILURE"; false )
- name: "Build images"
run: make images
- name: "Run Tests"
run: make test