-
Notifications
You must be signed in to change notification settings - Fork 21
64 lines (55 loc) · 1.77 KB
/
golang.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Go
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build and Test using Golang ${{ matrix.go-version }}
strategy:
fail-fast: false
matrix:
go-version: [1.19.x, 1.20.x, stable]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: go/src/github.com/refraction-networking/conjure
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler software-properties-common -y -q
sudo apt-get install libzmq3-dev libssl-dev pkg-config libgmp3-dev -y -q
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: |
cd $GITHUB_WORKSPACE/go/src/github.com/refraction-networking/conjure
export GOPATH="$GITHUB_WORKSPACE/go"
go test -v -race ./...
- name: Build app
run: |
cd $GITHUB_WORKSPACE/go/src/github.com/refraction-networking/conjure
make app
- name: Build registration-server
run: |
cd $GITHUB_WORKSPACE/go/src/github.com/refraction-networking/conjure
make registration-server
golangci-lint:
name: Format and Lint with golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler software-properties-common -y -q
sudo apt-get install libzmq3-dev libssl-dev pkg-config libgmp3-dev -y -
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: -v --disable structcheck,govet --timeout 5m