Skip to content

Commit 398867e

Browse files
izyakizyak
and
izyak
authored
ci: Go Protofile build test (#384)
* feat: Add extended methods for tm signed header * chore: Make artifacts folder if not exists * feat: Add CI for go libraries * fix: Clone repo in CI * chore: Name * fix: Changes after removing duplicate MerklePrefix in proto (#385) Co-authored-by: izyak <test@test.com> --------- Co-authored-by: izyak <test@test.com>
1 parent 043c6ea commit 398867e

File tree

12 files changed

+416
-656
lines changed

12 files changed

+416
-656
lines changed

.github/workflows/go.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build Proto Generated Go Library
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
paths:
8+
- 'libraries/go/**'
9+
push:
10+
branches:
11+
- main
12+
paths:
13+
- 'libraries/go/**'
14+
15+
jobs:
16+
build:
17+
name: Go build
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Clone
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
# Install and setup go
25+
- name: Set up Go 1.19
26+
uses: actions/setup-go@v2
27+
with:
28+
go-version: 1.19
29+
30+
# setup gopath
31+
- name: Set PATH
32+
run: |
33+
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
34+
shell: bash
35+
36+
# proto
37+
- name: Make go proto
38+
run: make proto-gen-go
39+
40+
# build go library
41+
- name: Build go libraries
42+
run: make gobuild

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,7 @@ proto-gen-rust:
3636
@if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoGenRust}$$"; then docker start -a $(containerProtoGenRust); else docker run --name $(containerProtoGenRust) -v $(CURDIR):/workspace --workdir /workspace -d $(protoImageName) \
3737
sh ./scripts/protocgen_rust.sh; fi
3838

39-
.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps
39+
gobuild:
40+
go build .
41+
42+
.PHONY: proto-all proto-gen proto-gen-any proto-swagger-gen proto-format proto-lint proto-check-breaking proto-update-deps gobuild

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ require (
1414
github.com/docker/go-connections v0.4.0
1515
github.com/gdamore/tcell/v2 v2.6.0
1616
github.com/gogo/protobuf v1.3.3
17+
github.com/gorilla/websocket v1.5.0
1718
github.com/icon-project/icon-bridge v0.0.11
1819
github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8
1920
github.com/spf13/viper v1.15.0
@@ -117,7 +118,6 @@ require (
117118
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
118119
github.com/gorilla/handlers v1.5.1 // indirect
119120
github.com/gorilla/mux v1.8.0 // indirect
120-
github.com/gorilla/websocket v1.5.0 // indirect
121121
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
122122
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
123123
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect

libraries/go/common/icon/Connection.pb.go

+35-211
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package tendermint
2+
3+
func (m *SignedHeader) ValidateBasic() error { return nil }
4+
func (m *SignedHeader) ClientType() string { return "tendermint" }

0 commit comments

Comments
 (0)