Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add interop tests to CI #111

Merged
merged 2 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
15 changes: 11 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{erl_opts, [debug_info]}.

{deps, [{chatterbox, ".*", {git, "https://github.com/tsloughter/chatterbox", {branch, "master"}}},
{deps, [{chatterbox, {pkg, ts_chatterbox}},
ctx,
acceptor_pool,
gproc]}.
Expand All @@ -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
7 changes: 3 additions & 4 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{"1.2.0",
[{<<"acceptor_pool">>,{pkg,<<"acceptor_pool">>,<<"1.0.0">>},0},
{<<"chatterbox">>,
{git,"https://github.com/tsloughter/chatterbox",
{ref,"73d5bf2355bfb520440cfb4458030ecec09f36e6"}},
0},
{<<"chatterbox">>,{pkg,<<"ts_chatterbox">>,<<"0.15.0">>},0},
{<<"ctx">>,{pkg,<<"ctx">>,<<"0.6.0">>},0},
{<<"gproc">>,{pkg,<<"gproc">>,<<"0.9.1">>},0},
{<<"hpack">>,{pkg,<<"hpack_erl">>,<<"0.3.0">>},1}]}.
[
{pkg_hash,[
{<<"acceptor_pool">>, <<"43C20D2ACAE35F0C2BCD64F9D2BDE267E459F0F3FD23DAB26485BF518C281B21">>},
{<<"chatterbox">>, <<"AB57F302A4817B8E3E47D243F9926AE3D9A6CF2BF8E733E519776083363B8D2B">>},
{<<"ctx">>, <<"8FF88B70E6400C4DF90142E7F130625B82086077A45364A78D208ED3ED53C7FE">>},
{<<"gproc">>, <<"F1DF0364423539CF0B80E8201C8B1839E229E5F9B3CCB944C5834626998F5B8C">>},
{<<"hpack">>, <<"2461899CC4AB6A0EF8E970C1661C5FC6A52D3C25580BC6DD204F84CE94669926">>}]},
{pkg_hash_ext,[
{<<"acceptor_pool">>, <<"0CBCD83FDC8B9AD2EEE2067EF8B91A14858A5883CB7CD800E6FCD5803E158788">>},
{<<"chatterbox">>, <<"7F754E883FA15BF6FFBE9A8AA115D09619C0E467637F825A2B1AC457F6FEC5B6">>},
{<<"ctx">>, <<"A14ED2D1B67723DBEBBE423B28D7615EB0BDCBA6FF28F2D1F1B0A7E1D4AA5FC2">>},
{<<"gproc">>, <<"905088E32E72127ED9466F0BAC0D8E65704CA5E73EE5A62CB073C3117916D507">>},
{<<"hpack">>, <<"D6137D7079169D8C485C6962DFE261AF5B9EF60FBC557344511C1E65E3D95FB0">>}]}
Expand Down
Loading