Skip to content

Commit

Permalink
chore(bigtable): Add a Github workflow to run Bigtable conformance te…
Browse files Browse the repository at this point in the history
…sts (#25931)
  • Loading branch information
meagar committed May 24, 2024
1 parent eacf963 commit 125346e
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/conformance.yaml
Original file line number Diff line number Diff line change
@@ -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
37 changes: 37 additions & 0 deletions .kokoro/conformance.sh
Original file line number Diff line number Diff line change
@@ -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}
31 changes: 31 additions & 0 deletions google-cloud-bigtable/test/test_proxy/known_failures.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 125346e

Please sign in to comment.