diff options
Diffstat (limited to 'scripts/test-mysql.sh')
| -rwxr-xr-x | scripts/test-mysql.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/test-mysql.sh b/scripts/test-mysql.sh new file mode 100755 index 0000000..792c2f9 --- /dev/null +++ b/scripts/test-mysql.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +echo "Running MySQL tests..." +env $(cat .env.mysql | xargs) docker-compose -f docker-compose.mysql.yml up -d + +echo "Waiting for MySQL to be ready..." +sleep 15 +until docker exec bolt_mysql_db mysqladmin ping -h localhost --silent 2>/dev/null; do + echo "Waiting for MySQL..." + sleep 5 +done +echo "MySQL is ready." + +env $(cat .env.mysql | xargs) go test -p 1 -tags "mysql" -covermode=count -coverprofile=coverage-mysql.out ./... + +docker-compose -f docker-compose.mysql.yml down +echo "MySQL tests completed." |