Skip to content

Commit 8193312

Browse files
committed
Another attempt
1 parent d1037f1 commit 8193312

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/go.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ jobs:
3535
cassandra:
3636
image: cassandra:4.0
3737
env:
38-
CASSANDRA_USER: cassandra
39-
CASSANDRA_PASSWORD: cassandra
38+
CASSANDRA_USER: admin
39+
CASSANDRA_PASSWORD: password
4040
ports:
4141
- "9042:9042"
42+
# Health check to wait until Cassandra is ready
4243
options: >-
4344
--health-cmd="cqlsh localhost 9042 --execute='describe keyspaces'"
4445
--health-interval=10s
@@ -106,17 +107,24 @@ jobs:
106107
# Install PostgreSQL client
107108
sudo apt-get update
108109
sudo apt-get install -y postgresql-client
110+
111+
# Install Cassandra client
112+
sudo apt-get install -y curl
113+
curl -fsSL https://www.apache.org/dist/cassandra/KEYS | sudo gpg --dearmor -o /usr/share/keyrings/cassandra-archive-keyring.gpg
114+
echo "deb [signed-by=/usr/share/keyrings/cassandra-archive-keyring.gpg] https://apache.jfrog.io/artifactory/cassandra-deb/ 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list
115+
sudo apt-get update
116+
sudo apt-get install -y cassandra-tools
109117
110118
- name: Create Cassandra keyspace
111119
run: |
112120
# Wait for Cassandra to be ready
113-
until cqlsh localhost 9042 --execute='describe keyspaces' > /dev/null 2>&1; do
121+
until cqlsh -u cassandra -p cassandra localhost 9042 --execute='describe keyspaces' > /dev/null 2>&1; do
114122
echo "Waiting for Cassandra to be ready..."
115123
sleep 5
116124
done
117125
118126
echo "Creating Cassandra keyspace..."
119-
cqlsh localhost 9042 --execute="CREATE KEYSPACE IF NOT EXISTS perfkit_db_ci WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"
127+
cqlsh -u cassandra -p cassandra localhost 9042 --execute="CREATE KEYSPACE IF NOT EXISTS perfkit_db_ci WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};"
120128
121129
- name: Create vector extension
122130
run: PGPASSWORD=password psql -h localhost -U root -d perfkit_pg_vector_db_ci -c "CREATE EXTENSION vector;"

0 commit comments

Comments
 (0)