Add support for default project for registered clusters #675
Workflow file for this run
This file contains 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: tests | |
on: | |
pull_request: # trigger on pull requests | |
push: | |
branches: # array of glob patterns matching against refs/heads. Optional; defaults to all | |
- main | |
jobs: | |
test: | |
strategy: | |
matrix: | |
server: | |
- 7.1.1 | |
- 7.0.3 | |
platform: | |
- ubuntu-20.04 | |
runs-on: ${{ matrix.platform }} | |
services: | |
couchbase: | |
image: couchbase:enterprise-${{ matrix.server }} | |
ports: | |
- 8091-8096:8091-8096 | |
- 18091-18096:18091-18096 | |
- 11210:11210 | |
- 11207:11207 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: "v1" | |
cache-on-failure: "true" | |
- name: Install cbdinocluster | |
run: | | |
mkdir -p "$HOME/bin" | |
wget -nv -O $HOME/bin/cbdinocluster https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.41/cbdinocluster-linux-amd64 | |
chmod +x $HOME/bin/cbdinocluster | |
echo "$HOME/bin" >> $GITHUB_PATH | |
- name: Initialize cbdinocluster | |
run: | | |
cbdinocluster -v init --auto | |
- name: Start couchbase cluster | |
env: | |
CLUSTERCONFIG: | | |
nodes: | |
- count: 3 | |
version: ${{ matrix.server }} | |
services: [kv, n1ql, index, fts, cbas] | |
docker: | |
kv-memory: 2048 | |
run: | | |
CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTERCONFIG}") | |
cbdinocluster -v buckets add ${CBDC_ID} default --ram-quota-mb=100 --flush-enabled=true --num-replicas=2 | |
CBDC_CONNSTR=$(cbdinocluster mgmt $CBDC_ID) | |
echo "CBDC_CONNSTR=$CBDC_CONNSTR" >> "$GITHUB_ENV" | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
env: | |
CONN_STRING: ${{ env.CBDC_CONNSTR }} | |
CBSH_LOG: cbsh=trace | |
DATA_TIMEOUT: "30s" | |
with: | |
command: test | |
args: --features ${{ matrix.server }} --quiet |