Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8725e6d

Browse files
author
Marc Wolf
committed
[TASK] Add MariaDB test
1 parent 884d5ad commit 8725e6d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎.github/workflows/docker-compose-test.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
4343
- name: Test Redis
4444
run: |
45-
sleep 5
45+
sleep 5 # Wait for Redis to fully initialize
4646
REDIS_TEST=$(docker-compose exec -T redis redis-cli ping)
4747
if [[ "$REDIS_TEST" != "PONG" ]]; then
4848
echo "Redis test failed. No PONG response."
@@ -51,6 +51,17 @@ jobs:
5151
echo "Redis test successful."
5252
fi
5353
54+
- name: Test MariaDB
55+
run: |
56+
sleep 10 # Wait for MariaDB to fully initialize
57+
MARIADB_TEST=$(docker-compose exec -T mariadb mysql -u${MARIADB_USER} -p${MARIADB_PASSWORD} -e "SHOW DATABASES LIKE '${MARIADB_DATABASE}';")
58+
if [[ "$MARIADB_TEST" != *"${MARIADB_DATABASE}"* ]]; then
59+
echo "MariaDB test failed. Database not found."
60+
exit 1
61+
else
62+
echo "MariaDB test successful."
63+
fi
64+
5465
- name: Cleanup
5566
run: |
5667
docker-compose -f docker-compose.yml down

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /