Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Add sample_type field to permit in-code samples. (#2996)
Browse files Browse the repository at this point in the history
* Add sample_type field to permit in-code samples.

* Fix environment variable so CircleCI test runs
  • Loading branch information
vchudnov-g authored Nov 1, 2019
1 parent 45a4695 commit d8d32b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,13 @@ anchor_test_ruby_client: &anchor_test_ruby_client
command: |
if [ -e ${RUBY_GEN_DIR}/google-cloud-${TEST_API} ]
then
echo "Testing ${TEST_API} in the ${LANGUAGE} language"
cd ${RUBY_GEN_DIR}/google-cloud-${TEST_API}
bundle update
bundle exec rake test
else
echo "Ruby ${TEST_API} library was not generated."
echo "Ruby ${TEST_API} library was not generated for ${LANGUAGE} at ${RUBY_GEN_DIR}."
ls -la ${RUBY_GEN_DIR}
exit 1
fi
when: always
Expand All @@ -133,6 +135,10 @@ anchor_run_ruby: &anchor_run_ruby
- attach_workspace:
# Use the workspace created in generate-clients
at: workspace
- run:
name: Prepare environment # The environment set for this job does not seem to propagate
command: |
echo 'export RUBY_GEN_DIR="/tmp/workspace/gapic-generator/artman-genfiles/ruby/google-cloud-ruby/"' >> $BASH_ENV
- run:
<<: *anchor_run_decrypt
- run:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ message SampleSpecProto {
// Definition of how to handle the RPC response, specified as an
// ordered list of statements.
repeated ResponseStatementProto response = 9;

// A list of the types samples to generate from this
// configuration. The elements can be any of "standalone" and
// "incode/XXX", where XXX is an arbitrary run of alphanumeric
// characters (these are used to lexicographically sort multiple
// in-code samples for the same RPC when including them in the
// library source code). If not specified or empty, defaults to
// ["standalone"]
repeated string sample_type = 10;
}

message RequestFieldProto {
Expand Down

0 comments on commit d8d32b5

Please sign in to comment.