{"id":16448,"date":"2024-10-15T09:21:41","date_gmt":"2024-10-15T16:21:41","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/?p=16448"},"modified":"2024-10-18T12:14:47","modified_gmt":"2024-10-18T19:14:47","slug":"automate-couchbase-tests-github-actions","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/","title":{"rendered":"Testing Couchbase with GitHub Actions and CBSH"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">I have recently been working on an exciting project, a wasmCloud capability provider for Couchbase. We are building this in the open with the fine folks at<\/span>\u00a0<a href=\"https:\/\/cosmonic.com\/\"><span style=\"font-weight: 400;\">Cosmonic<\/span><\/a><span style=\"font-weight: 400;\">. You can checkout the code <a href=\"https:\/\/github.com\/couchbaselabs\/wasmcloud-provider-couchbase\">in our repository<\/a>.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And early in every project comes the topic of development life cycle and its infrastructure. How do we automatically run tests of our project involving a Couchbase Server? GitHub provides <a href=\"https:\/\/docs.github.com\/en\/actions\">Actions<\/a> that allows us to execute code in various moments.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">To create an action, you can either click on the Action tab of your repository or add a file under <\/span><i><span style=\"font-weight: 400;\"><code>.github\/workflows<\/code><\/span><\/i><span style=\"font-weight: 400;\">. There are a lot of different ways to trigger the execution of the action. Like on every <\/span><i><span style=\"font-weight: 400;\"><code>git push<\/code><\/span><\/i><span style=\"font-weight: 400;\">. I just want something simple that makes sure my Couchbase Cluster is still here and accessible through specific secrets or environment variables. So here I will just choose a basic cron expression. The action will be executed every Monday at midnight.<\/span><\/p>\n<pre class=\"nums:false lang:default decode:true\">name: test Couchbase Credential\r\non:\r\n\u00a0\u00a0schedule:\r\n\u00a0\u00a0\u00a0\u00a0- cron:\u00a0 '0 0 * * 1'<\/pre>\n<p><span style=\"font-weight: 400;\">Now, about secrets and environment variables. Of course, some of them are, well, secrets. And must be managed as such. Thankfully GitHub thought of everything and gives us a way to set up secrets or environment variables per repository or organization. If you go under Settings\/Secrets and variables\/actions, you should see the following page:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-16449\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5-1024x1008.png\" alt=\"\" width=\"900\" height=\"886\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5-1024x1008.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5-300x295.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5-768x756.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5-65x65.png 65w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5-50x50.png 50w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image1-5.png 1245w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">This allows you to define any secret or environment variable you may need for your actions, and more. Here you can see I have set up:<\/span><\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>COUCHBASE_BUCKET<\/strong> &#8211; The name of the Bucket I want to use<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>COUCHBASE_CONNECTION_STRING<\/strong> &#8211; The full Couchbase connection String, as given in the <\/span><i><span style=\"font-weight: 400;\">connect<\/span><\/i><span style=\"font-weight: 400;\"> Capella tab for instance<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>COUCHBASE_USERNAME<\/strong> &#8211; The username used to connect to the cluster<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\"><strong>COUCHBASE_PASSWORD<\/strong> &#8211; The password used to connect to the cluster<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Now comes the time to write the test. All I want to do is make sure I have a working connection to a cluster, in order to show my collaborators how the secrets\/env variables can be used. A simple way to test a connection is to use the<\/span>\u00a0<a href=\"https:\/\/couchbase.sh\/\"><span style=\"font-weight: 400;\">Couchbase Shell<\/span><\/a><span style=\"font-weight: 400;\"> aka cbsh. It can be installed easily on Ubuntu. All you need is to download and untar it. This can be done in a couple steps:<\/span><\/p>\n<pre class=\"nums:false lang:default decode:true\">jobs:\r\n\u00a0\u00a0test_credential:\r\n\u00a0\u00a0\u00a0\u00a0runs-on: ubuntu-latest\r\n\u00a0\u00a0\u00a0\u00a0name: Test that given env variable works\r\n\u00a0\u00a0\u00a0\u00a0steps:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0shell: bash\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0env:\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0COUCHBASE_CONNECTION_STRING: ${{ secrets.COUCHBASE_CONNECTION_STRING }}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0COUCHBASE_USERNAME: ${{ secrets.COUCHBASE_USERNAME }}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0COUCHBASE_PASSWORD: ${{ secrets.COUCHBASE_PASSWORD }}\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- run: wget https:\/\/github.com\/couchbaselabs\/couchbase-shell\/releases\/download\/v0.75.1\/cbsh-x86_64-unknown-linux-gnu.tar.gz\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- run: tar -xvzf cbsh-x86_64-unknown-linux-gnu.tar.gz\r\n<\/pre>\n<p>From there the shell is available simply by running <i><code>.\/cbsh<\/code><\/i>. Notice here that the <i><code>runs-on<\/code><\/i> option gives us which container to use to run the action, <i><code>shell<\/code><\/i> is set to bash and <i><code>env<\/code><\/i> makes the secrets available as environment variables.<\/p>\n<p><span style=\"font-weight: 400;\">Because this shell is based on <a href=\"https:\/\/www.nushell.sh\/\">nushell<\/a>\u00a0and a password will be prompted, I could not pipe it straight up after the invocation like this:<\/span><\/p>\n<pre class=\"nums:false wrap:true lang:default decode:true\">echo $COUCHBASE_PASSWORD | .\/cbsh --username $COUCHBASE_USERNAME--connstr $COUCHASE_CONNECTION_STRING<\/pre>\n<p><span style=\"font-weight: 400;\">Because this does not work, I had to use a <\/span><i><span style=\"font-weight: 400;\">cbsh<\/span><\/i><span style=\"font-weight: 400;\"> configuration file instead. And sadly the syntax is a bit tricky for multi-line text formatting and piping. Here, I am creating a new variable called <em>CONFIG<\/em>, that contains the environment variable values, putting the result in <em>$GITHUB_ENV<\/em>, which allows me to pass it to the next step, which echos it in the config file:<\/span><\/p>\n<pre class=\"nums:false lang:default decode:true\">- run: |\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0CONFIG=$(cat &lt;&lt; EOF\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0version = 1\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0[[cluster]]\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0identifier = \"local\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0connstr = \"$COUCHBASE_CONNECTION_STRING\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0username = \"$COUCHBASE_USERNAME\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0password = \"$COUCHBASE_PASSWORD\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0EOF\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0)\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo \"CONFIG&lt;&lt;EOF\" &gt;&gt; $GITHUB_ENV\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo \"$CONFIG\" &gt;&gt; $GITHUB_ENV\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo \"EOF\" &gt;&gt; $GITHUB_ENV\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- run: echo \"$CONFIG\" &gt;&gt; config\r\n<\/pre>\n<p>Once the config file is all set, <i>cbsh<\/i> can be invoked like so:<\/p>\n<pre class=\"nums:false lang:default decode:true \">\u00a0 \u00a0 \u00a0 - run: .\/cbsh --config-dir . -c cb-env<\/pre>\n<p><span style=\"font-weight: 400;\">The complete example is available in <a href=\"https:\/\/github.com\/couchbaselabs\/wasmcloud-provider-couchbase\/blob\/main\/.github\/workflows\/capella_connection_test.yml\">our repository as a YML file<\/a>.<\/span><span style=\"font-weight: 400;\">\u00a0And this is what a successful run looks like:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-16450\" src=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3-1024x821.png\" alt=\"\" width=\"900\" height=\"722\" srcset=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3-1024x821.png 1024w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3-300x240.png 300w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3-768x615.png 768w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3-1536x1231.png 1536w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3-1320x1058.png 1320w, https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/image2-3.png 1556w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">So there you go, you now know how to connect to Couchbase in a GitHub Action. And you also got acquainted with Couchbase Shell &#8211; give it a try to do \u00a0<a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-shell-data-manipulation\/\">more fun things<\/a> like migrating all collections, except the <\/span><em><span style=\"font-weight: 400;\">_default<\/span><\/em><span style=\"font-weight: 400;\"> collection:<\/span><\/p>\n<pre class=\"nums:false wrap:true lang:default decode:true\">collections --clusters \"On-Prem-Cluster\" --bucket \"travel-sample\" | select scope collection | where $it.scope != \"_default\" | where $it.collection != \"_default\" | each { |it| collections create $it.collection --clusters \"Capella-Cluster\" --bucket \"travel-sample-import\" --scope $it.scope<\/pre>\n<p><span style=\"font-weight: 400;\">And we have more AI-friendly features coming to Couchbase Shell, stay tuned!<\/span><\/p>\n<h2>References<\/h2>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><a href=\"https:\/\/github.com\/couchbaselabs\/wasmcloud-provider-couchbase\">wasmCloud provider for Couchbase (GitHub)<\/a><\/li>\n<li><a href=\"https:\/\/www.couchbase.com\/blog\/couchbase-shell-data-manipulation\/\">Using Couchbase Shell to Transform and Write Data (Blog)<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I have recently been working on an exciting project, a wasmCloud capability provider for Couchbase. We are building this in the open with the fine folks at\u00a0Cosmonic. You can checkout the code in our repository. And early in every project [&hellip;]<\/p>\n","protected":false},"author":49,"featured_media":16451,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[2242,2225,1816,2334],"tags":[2134,10020,10024,1413,10038],"ppma_author":[9023],"class_list":["post-16448","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-connectors","category-cloud","category-couchbase-server","category-monitoring","tag-actions","tag-cbshell","tag-couchbase-shell","tag-github","tag-nushell"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.8 (Yoast SEO v25.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Testing Couchbase with GitHub Actions and CBSH - The Couchbase Blog<\/title>\n<meta name=\"description\" content=\"Automate Couchbase connection tests in GitHub Actions using environment variables, secrets and Couchbase Shell, including set up steps.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Testing Couchbase with GitHub Actions and CBSH\" \/>\n<meta property=\"og:description\" content=\"Automate Couchbase connection tests in GitHub Actions using environment variables, secrets and Couchbase Shell, including set up steps.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-15T16:21:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-18T19:14:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase-1024x536.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"536\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Laurent Doguin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ldoguin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"unstructured.io\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\"},\"author\":{\"name\":\"Laurent Doguin\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e\"},\"headline\":\"Testing Couchbase with GitHub Actions and CBSH\",\"datePublished\":\"2024-10-15T16:21:41+00:00\",\"dateModified\":\"2024-10-18T19:14:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\"},\"wordCount\":602,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png\",\"keywords\":[\"actions\",\"cbshell\",\"couchbase shell\",\"GitHub\",\"nushell\"],\"articleSection\":[\"Connectors\",\"Couchbase Capella\",\"Couchbase Server\",\"Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\",\"name\":\"Testing Couchbase with GitHub Actions and CBSH - The Couchbase Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png\",\"datePublished\":\"2024-10-15T16:21:41+00:00\",\"dateModified\":\"2024-10-18T19:14:47+00:00\",\"description\":\"Automate Couchbase connection tests in GitHub Actions using environment variables, secrets and Couchbase Shell, including set up steps.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png\",\"width\":2400,\"height\":1256},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.couchbase.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Testing Couchbase with GitHub Actions and CBSH\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#website\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\/\/www.couchbase.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"contentUrl\":\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png\",\"width\":218,\"height\":34,\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e\",\"name\":\"Laurent Doguin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/12929ce99397769f362b7a90d6b85071\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g\",\"caption\":\"Laurent Doguin\"},\"description\":\"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase.\",\"sameAs\":[\"https:\/\/x.com\/ldoguin\"],\"honorificPrefix\":\"Mr\",\"birthDate\":\"1985-06-07\",\"gender\":\"male\",\"award\":[\"Devoxx Champion\",\"Couchbase Legend\"],\"knowsAbout\":[\"Java\"],\"knowsLanguage\":[\"English\",\"French\"],\"jobTitle\":\"Director Developer Relation & Strategy\",\"worksFor\":\"Couchbase\",\"url\":\"https:\/\/www.couchbase.com\/blog\/author\/laurent-doguin\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Testing Couchbase with GitHub Actions and CBSH - The Couchbase Blog","description":"Automate Couchbase connection tests in GitHub Actions using environment variables, secrets and Couchbase Shell, including set up steps.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/","og_locale":"en_US","og_type":"article","og_title":"Testing Couchbase with GitHub Actions and CBSH","og_description":"Automate Couchbase connection tests in GitHub Actions using environment variables, secrets and Couchbase Shell, including set up steps.","og_url":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/","og_site_name":"The Couchbase Blog","article_published_time":"2024-10-15T16:21:41+00:00","article_modified_time":"2024-10-18T19:14:47+00:00","og_image":[{"width":1024,"height":536,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase-1024x536.png","type":"image\/png"}],"author":"Laurent Doguin","twitter_card":"summary_large_image","twitter_creator":"@ldoguin","twitter_misc":{"Written by":"unstructured.io","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/"},"author":{"name":"Laurent Doguin","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e"},"headline":"Testing Couchbase with GitHub Actions and CBSH","datePublished":"2024-10-15T16:21:41+00:00","dateModified":"2024-10-18T19:14:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/"},"wordCount":602,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png","keywords":["actions","cbshell","couchbase shell","GitHub","nushell"],"articleSection":["Connectors","Couchbase Capella","Couchbase Server","Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/","url":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/","name":"Testing Couchbase with GitHub Actions and CBSH - The Couchbase Blog","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png","datePublished":"2024-10-15T16:21:41+00:00","dateModified":"2024-10-18T19:14:47+00:00","description":"Automate Couchbase connection tests in GitHub Actions using environment variables, secrets and Couchbase Shell, including set up steps.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/1\/2024\/10\/blog-github-actions-couchbase.png","width":2400,"height":1256},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/automate-couchbase-tests-github-actions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Testing Couchbase with GitHub Actions and CBSH"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/2023\/04\/admin-logo.png","width":218,"height":34,"caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/c0aa9b8f1ed51b7a9e2f7cb755994a5e","name":"Laurent Doguin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/image\/12929ce99397769f362b7a90d6b85071","url":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","caption":"Laurent Doguin"},"description":"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase.","sameAs":["https:\/\/x.com\/ldoguin"],"honorificPrefix":"Mr","birthDate":"1985-06-07","gender":"male","award":["Devoxx Champion","Couchbase Legend"],"knowsAbout":["Java"],"knowsLanguage":["English","French"],"jobTitle":"Director Developer Relation & Strategy","worksFor":"Couchbase","url":"https:\/\/www.couchbase.com\/blog\/author\/laurent-doguin\/"}]}},"authors":[{"term_id":9023,"user_id":49,"is_guest":0,"slug":"laurent-doguin","display_name":"Laurent Doguin","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/b8c466908092b46634af916b6921f30187a051e4367ded7ac9b1a3f2c5692fd2?s=96&d=mm&r=g","author_category":"","last_name":"Doguin","first_name":"Laurent","job_title":"","user_url":"","description":"Laurent is a nerdy metal head who lives in Paris. He mostly writes code in Java and structured text in AsciiDoc, and often talks about data, reactive programming and other buzzwordy stuff. He is also a former Developer Advocate for Clever Cloud and Nuxeo where he devoted his time and expertise to helping those communities grow bigger and stronger. He now runs Developer Relations at Couchbase."}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/16448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/comments?post=16448"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/posts\/16448\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media\/16451"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/media?parent=16448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/categories?post=16448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/tags?post=16448"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=16448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}