feat: modernize to DHTMLSQL 2.0 — PHP 8.4+, native prepared statement… #1
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: Tests | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| jobs: | |
| test: | |
| name: "PHP ${{ matrix.php }} / MySQL ${{ matrix.mysql }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.4", "8.5"] | |
| mysql: ["8.0", "8.4"] | |
| services: | |
| mysql: | |
| image: "mysql:${{ matrix.mysql }}" | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: dhtmlsql_test | |
| MYSQL_USER: dhtmlsql | |
| MYSQL_PASSWORD: secret | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="mysqladmin ping --silent" | |
| --health-interval=10s | |
| --health-timeout=5s | |
| --health-retries=5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP ${{ matrix.php }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mysqli | |
| coverage: none | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: "${{ runner.os }}-composer-${{ hashFiles('composer.lock') }}" | |
| restore-keys: "${{ runner.os }}-composer-" | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Check coding style | |
| run: composer style:check | |
| - name: Run static analysis | |
| run: composer analyse | |
| - name: Run unit tests | |
| run: composer test:unit | |
| - name: Run integration tests | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_DATABASE: dhtmlsql_test | |
| DB_USERNAME: dhtmlsql | |
| DB_PASSWORD: secret | |
| run: composer test:integration | |
| - name: Run compatibility tests | |
| env: | |
| DB_HOST: 127.0.0.1 | |
| DB_DATABASE: dhtmlsql_test | |
| DB_USERNAME: dhtmlsql | |
| DB_PASSWORD: secret | |
| run: composer test:compat | |
| - name: Upload test logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "test-logs-php${{ matrix.php }}-mysql${{ matrix.mysql }}" | |
| path: | | |
| .phpunit.result.cache |