1+ name : Run Tests
2+ permissions :
3+ contents : read
4+ packages : read
5+
6+ on :
7+ push :
8+ tags :
9+ - v*
10+ branches :
11+ - master
12+ pull_request :
13+ jobs :
14+ test :
15+ name : Data API Durability Impossible Test
16+ strategy :
17+ matrix :
18+ server :
19+ - 8.0.0-3534
20+ - 7.6.5
21+ - 7.2.2
22+
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v4
26+ with :
27+ submodules : recursive
28+ - uses : ../actions/install-cbdinocluster
29+ - name : Start couchbase cluster
30+ env :
31+ CLUSTERCONFIG : |
32+ nodes:
33+ - count: 3
34+ version: ${{ matrix.server }}
35+ services: [kv, n1ql, index, fts, cbas]
36+ docker:
37+ kv-memory: 2048
38+ index-memory: 1024
39+ fts-memory: 1024
40+ run : |
41+ CBDC_ID=$(cbdinocluster -v alloc --def="${CLUSTERCONFIG}")
42+ cbdinocluster -v buckets add ${CBDC_ID} default --ram-quota-mb=100 --flush-enabled=true --num-replicas=2
43+ cbdinocluster -v collections add ${CBDC_ID} default _default test
44+ CBDC_IP=$(cbdinocluster -v ip $CBDC_ID)
45+ echo "CBDC_ID=$CBDC_ID" >> "$GITHUB_ENV"
46+ echo "CBDC_IP=$CBDC_IP" >> "$GITHUB_ENV"
47+
48+ - uses : actions/setup-go@v5
49+ with :
50+ go-version : 1.24
51+ - uses : arduino/setup-protoc@v3
52+ with :
53+ version : 31.1
54+ repo-token : ${{ secrets.GITHUB_TOKEN }}
55+ - name : Install Tools
56+ run : |
57+ go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36
58+ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5
59+ go install github.com/matryer/moq@v0.5
60+ - name : Install Dependencies
61+ run : go get ./...
62+ - name : Generate Files
63+ run : |
64+ go generate ./...
65+ - name : Run Test
66+ env :
67+ SGTEST_CBCONNSTR : ${{ env.CBDC_IP }}
68+ SGTEST_DINOID : ${{ env.CBDC_ID }}
69+ run : go test ./gateway/test -run TestGatewayOps -v -testify.m TestDapiDurabilityImpossible
70+
71+ - name : Collect couchbase logs
72+ timeout-minutes : 10
73+ if : failure()
74+ run : |
75+ mkdir -p ./dapi-durability-impossible
76+ cbdinocluster -v collect-logs $CBDC_ID ./dapi-durability-impossible-logs
77+ - name : Upload couchbase logs
78+ if : failure()
79+ uses : actions/upload-artifact@v4
80+ with :
81+ name : cbcollect-logs-${{ matrix.server }}
82+ path : ./dapi-durability-impossible/*
83+ retention-days : 5
0 commit comments