Skip to content

Commit

Permalink
add interop tests to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tsloughter committed Nov 18, 2023
1 parent 593a10c commit 85ebb2b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,29 @@ jobs:
file: _build/test/covertool/grpcbox.covertool.xml
env_vars: OTP_VERSION

- name: Setup Go 1.21.4
uses: actions/setup-go@v4
with:
# Semantic version range syntax or exact version of Go
go-version: '1.21.4'

- uses: actions/checkout@v4
with:
repository: 'grpc/grpc-go'
path: 'grpc-go'

- name: Install grpc-go interop client
run: |
cd grpc-go
go build -o ./go-grpc-interop-client ./interop/client
- name: Run interop tests
run: |
rebar3 as interop release
_build/interop/rel/grpc_interop/bin/grpc_interop daemon
PATH=grpc-go/:$PATH interop/run_server_tests.sh
dialyzer:
name: Dialyze on OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion interop/run_server_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tests=(

for test in "${tests[@]}"; do
echo -n "Running ${test}... "
$GOPATH/bin/go-grpc-interop-client -use_tls=$TLS -test_case=$test -server_port=$PORT
go-grpc-interop-client -use_tls=$TLS -test_case=$test -server_port=$PORT
if [[ $? -ne 0 ]]; then
echo "Failed!"
exit 1
Expand Down
3 changes: 2 additions & 1 deletion interop/test/grpcbox_interop_client_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ all() ->
groups() ->
Cases = [empty_unary, large_unary, client_streaming, server_streaming,
ping_pong, empty_stream, status_code_and_message, custom_metadata,
unimplemented_method, unimplemented_service],
unimplemented_method, unimplemented_service
],
[{identity, Cases},
{gzip, Cases}
].
Expand Down
13 changes: 10 additions & 3 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,25 @@
{gpb_opts, [{o, "test"},
{descriptor, true},
{module_name_suffix, "_pb"}]}]},

{overrides, [{override, opencensus, [{erl_opts, []}]}]},
{deps, [opencensus, jsx]}]},

{interop, [{grpc, [{protos, "interop/proto"},
{interop, [{deps, [recon]},

{grpc, [{protos, "interop/proto"},
{out_dir, "interop/src"},
{gpb_opts, [{o, "interop/src"},
{descriptor, true},
{module_name_suffix, "_pb"}]}]},

{relx, [{release, {grpc_interop, "0.1.0"}, [grpcbox]},

{sys_config, "interop/config/sys.config"}]},

{erl_opts, [{i, "interop/include"}]},

{extra_src_dirs, ["interop"]},
%% use src_dirs so the modules are in the release for testing
{src_dirs, ["src", "interop"]},

{ct_opts, [{config, "interop/config/sys.config"},
{dir, "interop/test"}]},
Expand Down

0 comments on commit 85ebb2b

Please sign in to comment.