Use MariaDB own healthcheck script #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MariaDB LTS Tests | |
| on: [push, pull_request] | |
| jobs: | |
| pdo-mysql: | |
| name: MariaDB LTS Tests - PHP ${{ matrix.php }} PDO mysql | |
| runs-on: ubuntu-latest | |
| env: | |
| DB_ADAPTER: pdo | |
| DB_PDO_PROTOCOL: mysql | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - 8.4 | |
| - 8.5 | |
| services: | |
| testdb: | |
| image: mariadb:lts | |
| env: | |
| MYSQL_ROOT_PASSWORD: Pass123 | |
| MYSQL_DATABASE: arc2_test | |
| MYSQL_ALLOW_EMPTY_PASSWORD: false | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="healthcheck.sh --connect --innodb_initialized" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=3 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| ini-values: memory_limit=1G | |
| - name: Install Composer dependencies | |
| run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader | |
| - name: Tests | |
| run: | | |
| vendor/bin/phpunit | |
| env: | |
| DB_PORT: ${{ job.services.testdb.ports[3306] }} |