Skip to content

Commit

Permalink
[TASK] Add MariaDB test
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Wolf committed Jun 11, 2024
1 parent 884d5ad commit 8725e6d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Test Redis
run: |
sleep 5
sleep 5 # Wait for Redis to fully initialize
REDIS_TEST=$(docker-compose exec -T redis redis-cli ping)
if [[ "$REDIS_TEST" != "PONG" ]]; then
echo "Redis test failed. No PONG response."
Expand All @@ -51,6 +51,17 @@ jobs:
echo "Redis test successful."
fi
- name: Test MariaDB
run: |
sleep 10 # Wait for MariaDB to fully initialize
MARIADB_TEST=$(docker-compose exec -T mariadb mysql -u${MARIADB_USER} -p${MARIADB_PASSWORD} -e "SHOW DATABASES LIKE '${MARIADB_DATABASE}';")
if [[ "$MARIADB_TEST" != *"${MARIADB_DATABASE}"* ]]; then
echo "MariaDB test failed. Database not found."
exit 1
else
echo "MariaDB test successful."
fi
- name: Cleanup
run: |
docker-compose -f docker-compose.yml down

0 comments on commit 8725e6d

Please sign in to comment.