1- name : Run Tests
1+ name : Run Integration Tests
22permissions :
33 contents : read
44 packages : read
1212 pull_request :
1313jobs :
1414 test :
15- name : Integration Test
15+ name : Test
1616 strategy :
1717 matrix :
1818 server :
@@ -22,40 +22,16 @@ jobs:
2222
2323 runs-on : ubuntu-latest
2424 steps :
25- - name : Install cbdinocluster
26- run : |
27- mkdir -p "$HOME/bin"
28- wget -nv -O $HOME/bin/cbdinocluster https://github.com/couchbaselabs/cbdinocluster/releases/download/v0.0.84/cbdinocluster-linux-amd64
29- chmod +x $HOME/bin/cbdinocluster
30- echo "$HOME/bin" >> $GITHUB_PATH
31- - name : Initialize cbdinocluster
32- run : |
33- cbdinocluster -v init --auto
34- env :
35- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36- - name : Start couchbase cluster
37- env :
38- CLUSTERCONFIG : |
39- nodes:
40- - count: 3
41- version: ${{ matrix.server }}
42- services: [kv, n1ql, index, fts, cbas]
43- docker:
44- kv-memory: 2048
45- index-memory: 1024
46- fts-memory: 1024
47- run : |
48- CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTERCONFIG}")
49- cbdinocluster -v buckets add ${CBDC_ID} default --ram-quota-mb=100 --flush-enabled=true --num-replicas=2
50- cbdinocluster -v collections add ${CBDC_ID} default _default test
51- cbdinocluster -v query ${CBDC_ID} "CREATE PRIMARY INDEX ON default"
52- CBDC_IP=$(cbdinocluster -v ip $CBDC_ID)
53- echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV"
54- echo "CBDC_IP=$CBDC_IP" >> "$GITHUB_ENV"
55-
5625 - uses : actions/checkout@v4
5726 with :
5827 submodules : recursive
28+ - name : Install cbdinocluster
29+ uses : ./.github/actions/install-cbdinocluster
30+ with :
31+ github-token : ${{ secrets.GITHUB_TOKEN }}
32+ - name : Start couchbase cluster
33+ id : start-cluster
34+ uses : ./.github/actions/start-couchbase-cluster
5935 - uses : actions/setup-go@v5
6036 with :
6137 go-version : 1.24
@@ -76,15 +52,15 @@ jobs:
7652 - name : Run Tests
7753 timeout-minutes : 10
7854 env :
79- SGTEST_CBCONNSTR : ${{ env.CBDC_IP }}
55+ SGTEST_CBCONNSTR : ${{ steps.start-cluster.outputs.node-ip }}
8056 run : go test -v $(go list ./... | grep -v /contrib/)
8157
8258 - name : Collect couchbase logs
8359 timeout-minutes : 10
8460 if : failure()
8561 run : |
8662 mkdir -p ./logs
87- cbdinocluster -v collect-logs $CBDC_ID ./logs
63+ cbdinocluster -v collect-logs ${{ steps.start-cluster.outputs.dino-id }} ./logs
8864 - name : Upload couchbase logs
8965 if : failure()
9066 uses : actions/upload-artifact@v4
0 commit comments