ING-856: Fixed cbqueryx.ResourceError to be a pointer. #1022
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: Run Tests | |
on: | |
push: | |
tags: | |
- v* | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
name: Integration Test | |
strategy: | |
matrix: | |
server: | |
- 7.2.2 | |
- 7.1.1 | |
- 7.0.3 | |
runs-on: ubuntu-20.04 | |
steps: | |
- 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: 512 | |
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 | |
cbdinocluster -v collections add ${CBDC_ID} default _default test | |
CBDC_CONNSTR=$(cbdinocluster -v connstr $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.20' | |
- name: Initialize deps | |
run: go get | |
- name: Generate mocks | |
run: | | |
go install github.com/matryer/moq@latest | |
go generate | |
- name: Run tests | |
timeout-minutes: 40 | |
env: | |
CBDC_ID: # from above | |
CBDC_CONNSTR: # from above | |
GCBDINOID: ${{ env.CBDC_ID }} | |
GCBCONNSTR: ${{ env.CBDC_CONNSTR }} | |
run: | | |
go test ./... -v -race -p 1 -skip "Dino$" | |
go test ./... -v -race -p 1 -run "Dino$" | |
- name: Collect couchbase logs | |
timeout-minutes: 10 | |
if: failure() | |
run: | | |
mkdir -p ./logs | |
cbdinocluster -v collect-logs $CBDC_ID ./logs | |
- name: Upload couchbase logs | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: cbcollect-logs | |
path: ./logs/* | |
retention-days: 5 |