Skip to content

Commit b45823f

Browse files
committed
wip
1 parent bf16ec3 commit b45823f

File tree

1 file changed

+109
-41
lines changed

1 file changed

+109
-41
lines changed

.github/workflows/main.yml

Lines changed: 109 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,45 @@ name: Build
33
on:
44
push:
55
branches:
6-
- master
6+
# - master
7+
- ci-integration-tests-simplify
78
pull_request:
89
types: [ opened, synchronize, reopened ]
910

1011
env:
1112
CCM_VERSION: "6e71061146f7ae67b84ccd2b1d90d7319b640e4c"
1213

1314
jobs:
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" ]
4042
compressor: [ "snappy" ]
41-
tags: [ "cassandra", "integration", "ccm" ]
43+
# tags: [ "cassandra", "integration", "ccm" ]
44+
tags: [ "all" ]
4245
steps:
4346
- uses: actions/checkout@v2
4447
- uses: actions/setup-go@v2
@@ -110,29 +113,14 @@ jobs:
110113
run: |
111114
source ~/venv/bin/activate
112115
export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
113-
go test -v -tags "${{ matrix.tags }} gocql_debug" -timeout=5m -race ${{ env.args }}
116+
# go test -v -tags "${{ matrix.tags }} gocql_debug" -timeout=5m -race ${{ env.args }}
114117
- name: 'Save ccm logs'
115118
if: 'failure()'
116119
uses: actions/upload-artifact@v4
117120
with:
118121
name: ccm-cluster-cassandra-${{ matrix.cassandra_version }}-go-${{ matrix.go }}-tag-${{ matrix.tags }}
119122
path: /home/runner/.ccm/test
120123
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:
136124
- uses: actions/checkout@v3
137125
- uses: actions/setup-go@v4
138126
with:
@@ -198,8 +186,88 @@ jobs:
198186
echo "args=$args" >> $GITHUB_ENV
199187
echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
200188
sleep 30s
201-
- name: Integration tests
202-
run: |
203-
source ~/venv/bin/activate
204-
export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
205-
go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}
189+
# integration-auth-cassandra:
190+
# timeout-minutes: 15
191+
# needs:
192+
# - build
193+
# name: Integration Tests with auth
194+
# runs-on: ubuntu-latest
195+
# strategy:
196+
# fail-fast: false
197+
# matrix:
198+
# go: [ '1.22', '1.23' ]
199+
# cassandra_version: [ '4.0.13' ]
200+
# compressor: [ "snappy" ]
201+
# tags: [ "integration" ]
202+
#
203+
# steps:
204+
# - uses: actions/checkout@v3
205+
# - uses: actions/setup-go@v4
206+
# with:
207+
# go-version: ${{ matrix.go }}
208+
# - name: Setup environment
209+
# uses: ./.github/actions/setup-environment
210+
# - name: Start cassandra nodes
211+
# run: |
212+
# source ~/venv/bin/activate
213+
# VERSION=${{ matrix.cassandra_version }}
214+
# keypath="$(pwd)/testdata/pki"
215+
# conf=(
216+
# "client_encryption_options.enabled: true"
217+
# "client_encryption_options.keystore: $keypath/.keystore"
218+
# "client_encryption_options.keystore_password: cassandra"
219+
# "client_encryption_options.require_client_auth: true"
220+
# "client_encryption_options.truststore: $keypath/.truststore"
221+
# "client_encryption_options.truststore_password: cassandra"
222+
# "concurrent_reads: 2"
223+
# "concurrent_writes: 2"
224+
# "write_request_timeout_in_ms: 5000"
225+
# "read_request_timeout_in_ms: 5000"
226+
# "authenticator: PasswordAuthenticator"
227+
# "authorizer: CassandraAuthorizer"
228+
# "enable_user_defined_functions: true"
229+
# )
230+
#
231+
# if [[ $VERSION == 3.*.* ]]; then
232+
# conf+=(
233+
# "rpc_server_type: sync"
234+
# "rpc_min_threads: 2"
235+
# "rpc_max_threads: 2"
236+
# "enable_user_defined_functions: true"
237+
# "enable_materialized_views: true"
238+
# )
239+
# elif [[ $VERSION == 4.0.* ]]; then
240+
# conf+=(
241+
# "enable_user_defined_functions: true"
242+
# "enable_materialized_views: true"
243+
# )
244+
# else
245+
# conf+=(
246+
# "user_defined_functions_enabled: true"
247+
# "materialized_views_enabled: true"
248+
# )
249+
# fi
250+
#
251+
# ccm remove test || true
252+
#
253+
# ccm create test -v $VERSION -n 1 -d --vnodes --jvm_arg="-Xmx256m -XX:NewSize=100m"
254+
# ccm updateconf "${conf[@]}"
255+
#
256+
# rm -rf $HOME/.ccm/test/node1/data/system_auth
257+
#
258+
# export JVM_EXTRA_OPTS=" -Dcassandra.test.fail_writes_ks=test -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"
259+
#
260+
# ccm start --wait-for-binary-proto --verbose
261+
# ccm status
262+
# ccm node1 nodetool status
263+
#
264+
# args="-gocql.timeout=60s -runssl -proto=4 -rf=3 -clusterSize=1 -autowait=2000ms -compressor=${{ matrix.compressor }} -gocql.cversion=$VERSION -cluster=$(ccm liveset) ./..."
265+
#
266+
# echo "args=$args" >> $GITHUB_ENV
267+
# echo "JVM_EXTRA_OPTS=$JVM_EXTRA_OPTS" >> $GITHUB_ENV
268+
# sleep 30s
269+
# - name: Integration tests
270+
# run: |
271+
# source ~/venv/bin/activate
272+
# export JVM_EXTRA_OPTS="${{env.JVM_EXTRA_OPTS}}"
273+
# go test -v -run=TestAuthentication -tags "${{ matrix.tags }} gocql_debug" -timeout=15s -runauth ${{ env.args }}

0 commit comments

Comments
 (0)