-
Notifications
You must be signed in to change notification settings - Fork 76
47 lines (41 loc) · 1.58 KB
/
go.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
name: Go
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16'
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
- name: Deps
run: |
sudo apt-get update -y
sudo apt install reprepro createrepo rsync openvpn -y
mkdir -p /tmp/protoc
pushd /tmp/protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.7/protoc-3.15.7-linux-x86_64.zip
unzip protoc-3.15.7-linux-x86_64.zip
popd
sudo chmod +x /tmp/protoc/bin/protoc
sudo cp /tmp/protoc/bin/protoc /usr/bin/protoc
sudo cp -r /tmp/protoc/include/* /usr/local/include/
sudo chmod -R 777 /usr/local/include/google
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
go install github.com/kevinburke/go-bindata/go-bindata@latest
go install github.com/goreleaser/nfpm/cmd/nfpm@latest
- name: Bundle
run: make bundle
- name: Test
run: make test