Skip to content

Commit a36e6b3

Browse files
committed
Fixed MariaDB for github
1 parent dc8f7a8 commit a36e6b3

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.github/workflows/go.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
build:
1515
runs-on: ubuntu-latest
16-
16+
1717
services:
1818
# Database service containers
1919
postgres:
@@ -82,21 +82,24 @@ jobs:
8282
--health-timeout 10s
8383
--health-retries 5
8484
85-
mariadb:
86-
image: mariadb:11.7
85+
mariadb-vector:
86+
image: mariadb:11.7.2-ubu2404
8787
env:
8888
MYSQL_ROOT_PASSWORD: password
8989
MYSQL_DATABASE: perfkit_db_ci
9090
MYSQL_USER: user
9191
MYSQL_PASSWORD: password
92+
# Disable features that cause warnings in GitHub Actions
93+
MARIADB_INNODB_USE_NATIVE_AIO: "0"
9294
ports:
9395
- 3306:3306
9496
# Health check for MariaDB
9597
options: >-
9698
--health-cmd "mysqladmin ping -h localhost -u root -ppassword"
9799
--health-interval 10s
98100
--health-timeout 5s
99-
--health-retries 5
101+
--health-retries 10
102+
--health-start-period 30s
100103
101104
opensearch:
102105
image: opensearchproject/opensearch:2.17.0
@@ -129,6 +132,18 @@ jobs:
129132
- name: Create vector extension
130133
run: PGPASSWORD=password psql -h localhost -U root -d perfkit_pg_vector_db_ci -c "CREATE EXTENSION vector;"
131134

135+
- name: Wait for MariaDB
136+
run: |
137+
# Wait for MariaDB to be fully ready
138+
for i in {1..30}; do
139+
if mysqladmin ping -h 127.0.0.1 -u root -ppassword --silent; then
140+
echo "MariaDB is ready"
141+
break
142+
fi
143+
echo "Waiting for MariaDB to be ready... ($i/30)"
144+
sleep 2
145+
done
146+
132147
- name: Test with Coverage
133148
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./db/sql/...
134149

0 commit comments

Comments
 (0)