Skip to content

Commit

Permalink
Fix imi test (#5199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft authored Nov 21, 2023
1 parent 0d4a69d commit 0c338d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,16 @@ jobs:
- name: imi Tests
if: matrix.framework == 'imi'
env:
SW_VERSION: 'master'
MYSQL_VERSION: '5.7'
MYSQL_SERVER_PASSWORD:
run: |
docker run --name mysql -d -p 3306:3306 --health-cmd="mysqladmin ping --silent" --health-interval=1s --health-retries=60 --health-timeout=3s -e MYSQL_ALLOW_EMPTY_PASSWORD=true mysql:${MYSQL_VERSION} --bind-address=0.0.0.0 --default-authentication-plugin=mysql_native_password
docker run --name redis -d -p 6379:6379 redis
docker run --name rabbitmq -d -p 4369:4369 -p 5672:5672 -p 15672:15672 -p 25672:25672 rabbitmq:management-alpine
git clone -b 2.1 https://github.com/imiphp/imi.git --depth=1
cd imi/
composer update -o
docker run --name mysql -p 3306:3306 -e MYSQL_ALLOW_EMPTY_PASSWORD=true -d mysql:${MYSQL_VERSION} --bind-address=0.0.0.0 --default-authentication-plugin=mysql_native_password
docker run --name redis -p 6379:6379 -d redis
docker run -d --restart=always --name rabbitmq -p 4369:4369 -p 5672:5672 -p 15672:15672 -p 25672:25672 rabbitmq:management-alpine
timeout 60s sh -c 'until docker ps | grep mysql | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 1; done'
mysql -h 127.0.0.1 -u root -e "CREATE DATABASE IF NOT EXISTS db_imi_test charset=utf8mb4 collate=utf8mb4_unicode_ci;"
./tests/db/install-db.sh
composer test-swoole
Expand Down

0 comments on commit 0c338d3

Please sign in to comment.