GOCO-43: Update README #71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- main | |
pull_request: | |
workflow_call: | |
jobs: | |
test: | |
name: Integration Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install cbdinocluster | |
run: | | |
mkdir -p "$HOME/bin" | |
wget -nv -O $HOME/bin/cbdinocluster https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.66/cbdinocluster-linux-amd64 | |
chmod +x $HOME/bin/cbdinocluster | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Install s3mock | |
run: | | |
docker pull adobe/s3mock | |
docker pull nginx | |
- name: Initialize cbdinocluster | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cbdinocluster -v init --auto | |
- name: Start couchbase cluster | |
env: | |
CLUSTERCONFIG: | | |
columnar: true | |
nodes: | |
- count: 3 | |
version: 1.2.0 | |
docker: | |
image: ghcr.io/cb-vanilla/columnar:1.2.0-1055 | |
docker: | |
load-balancer: true | |
use-dino-certs: true | |
run: | | |
CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTERCONFIG}") | |
CBDC_CONNSTR=$(cbdinocluster -v connstr --tls --analytics $CBDC_ID) | |
echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV" | |
echo "CBDC_CONNSTR=$CBDC_CONNSTR" >> "$GITHUB_ENV" | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
- name: Initialize deps | |
run: go get | |
- name: Run tests | |
timeout-minutes: 40 | |
env: | |
CBDC_ID: # from above | |
CBDC_CONNSTR: # from above | |
CBCONNSTR: ${{ env.CBDC_CONNSTR }} | |
run: | | |
go test ./... -v -race |