-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.07 KB
/
unit-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
44
45
46
name: Unit tests
on:
push:
branches:
- "main"
tags:
- "v*"
pull_request:
jobs:
unit-test:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.5
- name: Install package dependencies
run: |
sudo apt-get update
sudo apt-get install -y make protobuf-compiler libsystemd-dev curl
- name: Install Go dependencies
run: |
go install github.com/golang/protobuf/[email protected]
go install github.com/gogo/protobuf/[email protected]
go install github.com/fatih/[email protected]
- name: Test
run: make BUILD_IN_CONTAINER=false test
- name: Install golangci-lint
run: |
cd /
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sudo sh -s v1.55.2
- name: Run Linter
run: make lint