27 - Fix CI: drop service healthcheck, use nc wait loop for MySQL
This commit is contained in:
parent
856646ccde
commit
965dc88455
1 changed files with 8 additions and 1 deletions
|
|
@ -20,7 +20,6 @@ jobs:
|
|||
MYSQL_USER: incr_user
|
||||
MYSQL_PASSWORD: incr_password
|
||||
MYSQL_ROOT_PASSWORD: root_password
|
||||
options: --health-cmd="mysql -u root -proot_password -e 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=12
|
||||
|
||||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
|
@ -45,6 +44,14 @@ jobs:
|
|||
- name: Prepare environment
|
||||
run: cp .env.testing .env
|
||||
|
||||
- name: Wait for MySQL
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
nc -z db 3306 && echo "MySQL is up" && break
|
||||
echo "Waiting for MySQL... ($i/30)"
|
||||
sleep 2
|
||||
done
|
||||
|
||||
- name: Run migrations
|
||||
run: php artisan migrate --force
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue