From aa23925565e8d48c91318796786f17f710ba1b9f 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 | 23 +++++++++++++++++++++++ interop/run_server_tests.sh | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4f4911..971b48c 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: | + 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