@@ -3,42 +3,52 @@ name: Build
33on :
44 push :
55 branches :
6- - master
6+ # - master
7+ - ci-integration-tests-simplify
78 pull_request :
89 types : [ opened, synchronize, reopened ]
910
1011env :
1112 CCM_VERSION : " 6e71061146f7ae67b84ccd2b1d90d7319b640e4c"
1213
1314jobs :
14- build :
15- name : Unit tests
16- runs-on : ubuntu-latest
17- strategy :
18- matrix :
19- go : [ '1.22', '1.23' ]
20- steps :
21- - uses : actions/checkout@v3
22- - uses : actions/setup-go@v4
23- with :
24- go-version : ${{ matrix.go }}
25- - run : go vet
26- - name : Run unit tests
27- run : go test -v -tags unit -race
15+ # build:
16+ # name: Unit tests
17+ # runs-on: ubuntu-latest
18+ # strategy:
19+ # matrix:
20+ # go: [ '1.22', '1.23' ]
21+ # steps:
22+ # - uses: actions/checkout@v3
23+ # - uses: actions/setup-go@v4
24+ # with:
25+ # go-version: ${{ matrix.go }}
26+ # - run: go vet
27+ # - name: Run unit tests
28+ # run: go test -v -tags unit -race
2829 integration-cassandra :
2930 timeout-minutes : 15
30- needs :
31- - build
31+ # needs:
32+ # - build
3233 name : Integration Tests
3334 runs-on : ubuntu-latest
3435 strategy :
3536 fail-fast : false
3637 matrix :
37- go : [ '1.22', '1.23' ]
38+ # go: [ '1.22', '1.23' ]
39+ go : [ '1.22' ]
3840 cassandra_version : [ '4.0.13', '4.1.6' ]
39- auth : [ "false" ]
41+ auth : [ "false", "true" ]
4042 compressor : [ "snappy" ]
41- tags : [ "cassandra", "integration", "ccm" ]
43+ # tags: [ "cassandra", "integration", "ccm" ]
44+ tags : [ "cassandra integration ccm", "integration" ]
45+ exclude :
46+ - auth : " true"
47+ cassandra_version : ' 4.1.6'
48+ - auth : " true"
49+ tags : " cassandra integration ccm"
50+ - auth : " false"
51+ tags : " integration"
4252 steps :
4353 - uses : actions/checkout@v2
4454 - uses : actions/setup-go@v2
@@ -115,31 +125,11 @@ jobs:
115125 if : ' failure()'
116126 uses : actions/upload-artifact@v4
117127 with :
118- name : ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}
128+ name : ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}-auth-${{ matrix.auth}}
119129 path : /home/runner/.ccm/test
120130 retention-days : 5
121- integration-auth-cassandra :
122- timeout-minutes : 15
123- needs :
124- - build
125- name : Integration Tests with auth
126- runs-on : ubuntu-latest
127- strategy :
128- fail-fast : false
129- matrix :
130- go : [ '1.22', '1.23' ]
131- cassandra_version : [ '4.0.13' ]
132- compressor : [ "snappy" ]
133- tags : [ "integration" ]
134-
135- steps :
136- - uses : actions/checkout@v3
137- - uses : actions/setup-go@v4
138- with :
139- go-version : ${{ matrix.go }}
140- - name : Setup environment
141- uses : ./.github/actions/setup-environment
142- - name : Start cassandra nodes
131+ - name : Start cassandra nodes for auth if needed
132+ if : ${{ matrix.auth == 'true' }}
143133 run : |
144134 source ~/venv/bin/activate
145135 VERSION=${{ matrix.cassandra_version }}
@@ -159,7 +149,7 @@ jobs:
159149 "authorizer: CassandraAuthorizer"
160150 "enable_user_defined_functions: true"
161151 )
162-
152+
163153 if [[ $VERSION == 3.*.* ]]; then
164154 conf+=(
165155 "rpc_server_type: sync"
@@ -179,27 +169,113 @@ jobs:
179169 "materialized_views_enabled: true"
180170 )
181171 fi
182-
172+
183173 ccm remove test || true
184-
174+
185175 ccm create test -v $VERSION -n 1 -d --vnodes --jvm_arg="-Xmx256m -XX:NewSize=100m"
186176 ccm updateconf "${conf[@]}"
187-
177+
188178 rm -rf $HOME/.ccm/test/node1/data/system_auth
189-
179+
190180 export JVM_EXTRA_OPTS=" -Dcassandra.test.fail_writes_ks=test -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"
191-
181+
192182 ccm start --wait-for-binary-proto --verbose
193183 ccm status
194184 ccm node1 nodetool status
195-
185+
196186 args="-gocql.timeout=60s -runssl -proto=4 -rf=3 -clusterSize=1 -autowait=2000ms -compressor=${{ matrix.compressor }} -gocql.cversion=$VERSION -cluster=$(ccm liveset) ./..."
197-
187+
198188 echo "args=$args" >> $GITHUB_ENV
199189 echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
200190 sleep 30s
201191 - name : Integration tests
192+ if : ${{ matrix.auth == 'true' }}
202193 run : |
203194 source ~/venv/bin/activate
204195 export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
205196 go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
197+ # integration-auth-cassandra:
198+ # timeout-minutes: 15
199+ # # needs:
200+ # # - build
201+ # name: Integration Tests with auth
202+ # runs-on: ubuntu-latest
203+ # strategy:
204+ # fail-fast: false
205+ # matrix:
206+ # go: [ '1.22', '1.23' ]
207+ # cassandra_version: [ '4.0.13' ]
208+ # compressor: [ "snappy" ]
209+ # tags: [ "integration" ]
210+ #
211+ # steps:
212+ # - uses: actions/checkout@v3
213+ # - uses: actions/setup-go@v4
214+ # with:
215+ # go-version: ${{ matrix.go }}
216+ # - name: Setup environment
217+ # uses: ./.github/actions/setup-environment
218+ # - name: Start cassandra nodes
219+ # run: |
220+ # source ~/venv/bin/activate
221+ # VERSION=${{ matrix.cassandra_version }}
222+ # keypath="$(pwd)/testdata/pki"
223+ # conf=(
224+ # "client_encryption_options.enabled: true"
225+ # "client_encryption_options.keystore: $keypath/.keystore"
226+ # "client_encryption_options.keystore_password: cassandra"
227+ # "client_encryption_options.require_client_auth: true"
228+ # "client_encryption_options.truststore: $keypath/.truststore"
229+ # "client_encryption_options.truststore_password: cassandra"
230+ # "concurrent_reads: 2"
231+ # "concurrent_writes: 2"
232+ # "write_request_timeout_in_ms: 5000"
233+ # "read_request_timeout_in_ms: 5000"
234+ # "authenticator: PasswordAuthenticator"
235+ # "authorizer: CassandraAuthorizer"
236+ # "enable_user_defined_functions: true"
237+ # )
238+ #
239+ # if [[ $VERSION == 3.*.* ]]; then
240+ # conf+=(
241+ # "rpc_server_type: sync"
242+ # "rpc_min_threads: 2"
243+ # "rpc_max_threads: 2"
244+ # "enable_user_defined_functions: true"
245+ # "enable_materialized_views: true"
246+ # )
247+ # elif [[ $VERSION == 4.0.* ]]; then
248+ # conf+=(
249+ # "enable_user_defined_functions: true"
250+ # "enable_materialized_views: true"
251+ # )
252+ # else
253+ # conf+=(
254+ # "user_defined_functions_enabled: true"
255+ # "materialized_views_enabled: true"
256+ # )
257+ # fi
258+ #
259+ # ccm remove test || true
260+ #
261+ # ccm create test -v $VERSION -n 1 -d --vnodes --jvm_arg="-Xmx256m -XX:NewSize=100m"
262+ # ccm updateconf "${conf[@]}"
263+ #
264+ # rm -rf $HOME/.ccm/test/node1/data/system_auth
265+ #
266+ # export JVM_EXTRA_OPTS=" -Dcassandra.test.fail_writes_ks=test -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"
267+ #
268+ # ccm start --wait-for-binary-proto --verbose
269+ # ccm status
270+ # ccm node1 nodetool status
271+ #
272+ # args="-gocql.timeout=60s -runssl -proto=4 -rf=3 -clusterSize=1 -autowait=2000ms -compressor=${{ matrix.compressor }} -gocql.cversion=$VERSION -cluster=$(ccm liveset) ./..."
273+ #
274+ # echo "args=$args" >> $GITHUB_ENV
275+ # echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
276+ # sleep 30s
277+ # - name: Integration tests
278+ # run: |
279+ # source ~/venv/bin/activate
280+ # export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
281+ # go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
0 commit comments