@@ -3,49 +3,58 @@ 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 : [ "no-compression", "snappy", "lz4" ]
41- tags : [ "cassandra", "integration", "ccm" ]
43+ # tags: [ "cassandra", "integration", "ccm" ]
44+ tags : [ "cassandra integration ccm", "integration" ]
4245 proto_version : [ "4", "5" ]
4346 exclude :
4447 - proto_version : " 5"
4548 compressor : " snappy"
49+ - auth : " true"
50+ cassandra_version : ' 4.1.6'
51+ - auth : " true"
52+ tags : " cassandra integration ccm"
53+ - auth : " false"
54+ tags : " integration"
4655 steps :
47- - uses : actions/checkout@v2
48- - uses : actions/setup-go@v2
56+ - uses : actions/checkout@v3
57+ - uses : actions/setup-go@v4
4958 with :
5059 go-version : ${{ matrix.go }}
5160 - uses : actions/cache@v4
@@ -119,34 +128,11 @@ jobs:
119128 if : ' failure()'
120129 uses : actions/upload-artifact@v4
121130 with :
122- name : ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}-proto-version-${{ matrix.proto_version }}-compressor-${{ matrix.compressor }}
131+ name : ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}-proto-version-${{ matrix.proto_version }}-compressor-${{ matrix.compressor }}-auth-${{ matrix.auth}}
123132 path : /home/runner/.ccm/test
124133 retention-days : 5
125- integration-auth-cassandra :
126- timeout-minutes : 15
127- needs :
128- - build
129- name : Integration Tests with auth
130- runs-on : ubuntu-latest
131- strategy :
132- fail-fast : false
133- matrix :
134- go : [ '1.22', '1.23' ]
135- cassandra_version : [ '4.0.13' ]
136- compressor : [ "no-compression", "snappy", "lz4" ]
137- tags : [ "integration" ]
138- proto_version : [ "4", "5" ]
139- exclude :
140- - proto_version : " 5"
141- compressor : " snappy"
142- steps :
143- - uses : actions/checkout@v3
144- - uses : actions/setup-go@v4
145- with :
146- go-version : ${{ matrix.go }}
147- - name : Setup environment
148- uses : ./.github/actions/setup-environment
149- - name : Start cassandra nodes
134+ - name : Start cassndra nodes for auth if needed
135+ if : ${{ matrix.auth == 'true' }}
150136 run : |
151137 source ~/venv/bin/activate
152138 VERSION=${{ matrix.cassandra_version }}
@@ -207,6 +193,96 @@ jobs:
207193 sleep 30s
208194 - name : Integration tests
209195 run : |
196+ if: ${{ matrix.auth == 'true' }}
210197 source ~/venv/bin/activate
211198 export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
212199 go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
200+
201+ # integration-auth-cassandra:
202+ # timeout-minutes: 15
203+ # needs:
204+ # - build
205+ # name: Integration Tests with auth
206+ # runs-on: ubuntu-latest
207+ # strategy:
208+ # fail-fast: false
209+ # matrix:
210+ # go: [ '1.22', '1.23' ]
211+ # cassandra_version: [ '4.0.13' ]
212+ # compressor: [ "no-compression", "snappy", "lz4" ]
213+ # tags: [ "integration" ]
214+ # proto_version: [ "4", "5" ]
215+ # exclude:
216+ # - proto_version: "5"
217+ # compressor: "snappy"
218+ # steps:
219+ # - uses: actions/checkout@v3
220+ # - uses: actions/setup-go@v4
221+ # with:
222+ # go-version: ${{ matrix.go }}
223+ # - name: Setup environment
224+ # uses: ./.github/actions/setup-environment
225+ # - name: Start cassandra nodes
226+ # run: |
227+ # source ~/venv/bin/activate
228+ # VERSION=${{ matrix.cassandra_version }}
229+ # keypath="$(pwd)/testdata/pki"
230+ # conf=(
231+ # "client_encryption_options.enabled: true"
232+ # "client_encryption_options.keystore: $keypath/.keystore"
233+ # "client_encryption_options.keystore_password: cassandra"
234+ # "client_encryption_options.require_client_auth: true"
235+ # "client_encryption_options.truststore: $keypath/.truststore"
236+ # "client_encryption_options.truststore_password: cassandra"
237+ # "concurrent_reads: 2"
238+ # "concurrent_writes: 2"
239+ # "write_request_timeout_in_ms: 5000"
240+ # "read_request_timeout_in_ms: 5000"
241+ # "authenticator: PasswordAuthenticator"
242+ # "authorizer: CassandraAuthorizer"
243+ # "enable_user_defined_functions: true"
244+ # )
245+ #
246+ # if [[ $VERSION == 3.*.* ]]; then
247+ # conf+=(
248+ # "rpc_server_type: sync"
249+ # "rpc_min_threads: 2"
250+ # "rpc_max_threads: 2"
251+ # "enable_user_defined_functions: true"
252+ # "enable_materialized_views: true"
253+ # )
254+ # elif [[ $VERSION == 4.0.* ]]; then
255+ # conf+=(
256+ # "enable_user_defined_functions: true"
257+ # "enable_materialized_views: true"
258+ # )
259+ # else
260+ # conf+=(
261+ # "user_defined_functions_enabled: true"
262+ # "materialized_views_enabled: true"
263+ # )
264+ # fi
265+ #
266+ # ccm remove test || true
267+ #
268+ # ccm create test -v $VERSION -n 1 -d --vnodes --jvm_arg="-Xmx256m -XX:NewSize=100m"
269+ # ccm updateconf "${conf[@]}"
270+ #
271+ # rm -rf $HOME/.ccm/test/node1/data/system_auth
272+ #
273+ # export JVM_EXTRA_OPTS=" -Dcassandra.test.fail_writes_ks=test -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"
274+ #
275+ # ccm start --wait-for-binary-proto --verbose
276+ # ccm status
277+ # ccm node1 nodetool status
278+ #
279+ # args="-gocql.timeout=60s -runssl -proto=${{ matrix.proto_version }} -rf=3 -clusterSize=1 -autowait=2000ms -compressor=${{ matrix.compressor }} -gocql.cversion=$VERSION -cluster=$(ccm liveset) ./..."
280+ #
281+ # echo "args=$args" >> $GITHUB_ENV
282+ # echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
283+ # sleep 30s
284+ # - name: Integration tests
285+ # run: |
286+ # source ~/venv/bin/activate
287+ # export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
288+ # go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
0 commit comments