diff --git a/.github/workflows/conformance.yaml b/.github/workflows/conformance.yaml new file mode 100644 index 000000000000..9830074df78a --- /dev/null +++ b/.github/workflows/conformance.yaml @@ -0,0 +1,39 @@ +# This workflow runs the Bigtable Conformance Test suite against the Bigtable +# client library. +# See https://github.com/googleapis/cloud-bigtable-clients-test +on: + push: + branches: + - main + paths: + - 'google-cloud-bigtable/**' + pull_request: + paths: + - 'google-cloud-bigtable/**' +name: conformance +jobs: + bigtable_conformance: + runs-on: ubuntu-latest + strategy: + matrix: + ruby_version: [ + '3.0', + '3.1', + '3.2', + '3.3', + ] + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + repository: googleapis/cloud-bigtable-clients-test + ref: main + path: cloud-bigtable-clients-test + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby_version }} + bundler-cache: true + - uses: actions/setup-go@v5 + with: + go-version: '>=1.20.2' + - run: .kokoro/conformance.sh diff --git a/.kokoro/conformance.sh b/.kokoro/conformance.sh new file mode 100755 index 000000000000..0c81a9d2ae95 --- /dev/null +++ b/.kokoro/conformance.sh @@ -0,0 +1,37 @@ +set -x +set -eo pipefail + +ruby -v +go version + +export PORT=9999 + +# Start the test proxy + +pushd google-cloud-bigtable/test/test_proxy +bundle install +bundle exec ruby test_proxy.rb & +PROXY_PID=$! +echo "Proxy PID: $PROXY_PID" +popd + +# Run tests + +# Known failures should be listed in this file, one per line, ex: +# TestCheckAndMutateRow_Generic_CloseClient +# TestCheckAndMutateRow_Generic_DeadlineExceeded +# TestMutateRow_Generic_DeadlineExceeded +# TestMutateRow_Generic_CloseClient +# This shell command concatenates all the lines of the file with a pipe as a +# delimiter, to build a regex in the form "test1|test2|test3" for the -skip option +KNOWN_FAILURES=`cat google-cloud-bigtable/test/test_proxy/known_failures.txt | paste -sd '|'` +pushd cloud-bigtable-clients-test/tests +go test -v -proxy_addr=:$PORT -skip=$KNOWN_FAILURES +STATUS=$? +popd + +# Shut down the proxy + +kill $PROXY_PID + +exit ${STATUS} diff --git a/google-cloud-bigtable/test/test_proxy/known_failures.txt b/google-cloud-bigtable/test/test_proxy/known_failures.txt new file mode 100644 index 000000000000..fb897c3ad9fd --- /dev/null +++ b/google-cloud-bigtable/test/test_proxy/known_failures.txt @@ -0,0 +1,31 @@ +TestCheckAndMutateRow_Generic_CloseClient +TestCheckAndMutateRow_Generic_DeadlineExceeded +TestMutateRow_Generic_DeadlineExceeded +TestMutateRow_Generic_CloseClient +TestMutateRows_Generic_DeadlineExceeded +TestMutateRows_Retry_ExponentialBackoff +TestMutateRows_Generic_CloseClient +TestMutateRows_Retry_WithRoutingCookie +TestMutateRows_Retry_WithRetryInfo +TestReadModifyWriteRow_Generic_CloseClient +TestReadModifyWriteRow_Generic_DeadlineExceeded +TestReadRow_Generic_DeadlineExceeded +TestReadRow_Generic_CloseClient +TestReadRow_Retry_WithRoutingCookie +TestReadRow_Retry_WithRetryInfo +TestReadRows_NoRetry_OutOfOrderError +TestReadRows_ReverseScans_FeatureFlag_Enabled +TestReadRows_Retry_PausedScan +TestReadRows_Retry_LastScannedRow +TestReadRows_Retry_LastScannedRow_Reverse +TestReadRows_Retry_StreamReset +TestReadRows_Generic_CloseClient +TestReadRows_Generic_DeadlineExceeded +TestReadRows_Retry_WithRoutingCookie +TestReadRows_Retry_WithRoutingCookie_MultipleErrorResponses +TestReadRows_Retry_WithRetryInfo +TestReadRows_Retry_WithRetryInfo_MultipleErrorResponse +TestSampleRowKeys_Generic_CloseClient +TestSampleRowKeys_Generic_DeadlineExceeded +TestSampleRowKeys_Retry_WithRoutingCookie +TestSampleRowKeys_Retry_WithRetryInfo