Add test to build

This commit is contained in:
Jeffrey Picard 2021-10-30 01:36:24 -04:00
parent 914d2bfc61
commit 2ee8d2c3cc
3 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
name: 'Build Hub'
name: 'Build and Test Hub'
on:
push:
@ -10,4 +10,5 @@ jobs:
- uses: actions/setup-go@v2.1.3
with:
go-version: 1.16.5
- run: go build .
- run: go build .
- run: cd server && go test -v

View file

@ -1,4 +1,4 @@
name: 'Build Hub'
name: 'Build and Test Hub'
on:
push:
@ -30,3 +30,4 @@ jobs:
- run: go get github.com/golang/protobuf/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc
- run: go build .
- run: ./protobuf/build.sh
- run: cd server && go test -v

View file

@ -158,8 +158,9 @@ func TestPeerWriter(t *testing.T) {
Port: "50051",
}
} else {
x := i + 1
msg = &pb.ServerMessage{
Address: fmt.Sprintf("%d.%d.%d.%d", i, i, i, i),
Address: fmt.Sprintf("%d.%d.%d.%d", x, x, x, x),
Port: "50051",
}
}