diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4f4911..62e8e92 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 }} diff --git a/interop/run_server_tests.sh b/interop/run_server_tests.sh index f426a1c..dafef42 100755 --- a/interop/run_server_tests.sh +++ b/interop/run_server_tests.sh @@ -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 diff --git a/interop/test/grpcbox_interop_client_SUITE.erl b/interop/test/grpcbox_interop_client_SUITE.erl index 9bc02b4..9d241eb 100644 --- a/interop/test/grpcbox_interop_client_SUITE.erl +++ b/interop/test/grpcbox_interop_client_SUITE.erl @@ -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} ]. diff --git a/rebar.config b/rebar.config index 0e77bac..6e80ae9 100644 --- a/rebar.config +++ b/rebar.config @@ -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"}]},