From 55fe38f475cb37865d11d726b3eba7fb072afc7b Mon Sep 17 00:00:00 2001 From: Tristan Sloughter Date: Sun, 12 Nov 2023 03:25:06 -0700 Subject: [PATCH] add interop tests to CI --- .github/workflows/main.yml | 24 ++++++++++++++++++++++++ interop/run_server_tests.sh | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4f4911..1184888 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,6 +40,30 @@ 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 compile + erl -detached -config interop/config/sys.config -pa `rebar3 as interop path` -pa _build/interop/lib/grpcbox/interop/ -s application ensure_all_started grpcbox + + 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