-
-
Notifications
You must be signed in to change notification settings - Fork 29
45 lines (37 loc) · 1.03 KB
/
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
name: Test
on:
push:
pull_request:
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Install bgpq4 and bird2
run: |
wget http://ftp.us.debian.org/debian/pool/main/b/bgpq4/bgpq4_0.0.6-2_amd64.deb
sudo dpkg -i bgpq4*.deb
sudo apt install -y bird2
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: -E gosec
- run: go get -v -t -d ./...
- run: sudo chown $(whoami):$(whoami) /run/bird/bird.ctl
- run: sudo chown -R $(whoami):$(whoami) /etc/bird/
- run: go generate -x
- run: go build -v .
- run: make dep
- run: make test-setup
- run: make test
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
- run: make test-teardown