Skip to content

Commit

Permalink
ci: build dyplomat as part of CI (#700)
Browse files Browse the repository at this point in the history
Even though dyplomat has no tests, we should still add it to CI to get
a signal when dependabot wants to update the Go dependencies. We just
want to know whether it still builds.

Signed-off-by: James Peach <jpeach@apache.org>
  • Loading branch information
jpeach committed May 24, 2023
1 parent 63162f7 commit 9239064
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 3 additions & 2 deletions build/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ make examples
make test
make integration

cd ./xdsmatcher
make test
make -C xdsmatcher test
# TODO(snowp): Output coverage in CI

make -C examples/dyplomat test
8 changes: 8 additions & 0 deletions examples/dyplomat/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.PHONY: test
test:
go test ./... -race
.PHONY: coverage
coverage:
go test ./... -race -covermode=atomic -coverprofile=coverage.out
coverage_html: coverage
go tool cover -html=coverage.out
5 changes: 3 additions & 2 deletions examples/dyplomat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package main
import (
"context"
"fmt"
"github.com/envoyproxy/go-control-plane/pkg/resource/v3"
"net"
"time"

"github.com/envoyproxy/go-control-plane/pkg/resource/v3"

"google.golang.org/grpc"

core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
Expand Down Expand Up @@ -71,7 +72,7 @@ func main() {
}

if err := grpcServer.Serve(lis); err != nil {
fmt.Errorf("", err)
fmt.Printf("%v", err)
}
}

Expand Down
2 changes: 2 additions & 0 deletions xdsmatcher/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.PHONY: test
test:
go test ./... -race
.PHONY: coverage
coverage:
go test ./... -race -covermode=atomic -coverprofile=coverage.out
coverage_html: coverage
go tool cover -html=coverage.out
.PHONY: proto
proto: test/proto/*
protoc --proto_path=test/proto --go_out=test/proto --go_opt=paths=source_relative test.proto

Expand Down

0 comments on commit 9239064

Please sign in to comment.