JSON columns: define the round-trip contract, drop the skip, use json… #144
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| - trunk | |
| - 'release/**' | |
| pull_request: | |
| jobs: | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Cache Composer | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.composer/cache | |
| key: composer-${{ runner.os }}-${{ hashFiles('composer.lock') }} | |
| restore-keys: composer-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --no-progress | |
| - name: Run PHPStan | |
| run: vendor/bin/phpstan analyse --memory-limit=1G | |
| phpcs: | |
| name: PHPCS | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Cache Composer | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.composer/cache | |
| key: composer-${{ runner.os }}-${{ hashFiles('composer.lock') }} | |
| restore-keys: composer-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist --no-progress | |
| - name: Run PHPCS | |
| run: vendor/bin/phpcs | |
| phpunit: | |
| name: PHPUnit ${{ matrix.php }} / ${{ matrix.db }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Both engines at the supported floor and a current release, all gating, so | |
| # MySQL/MariaDB dialect divergence surfaces in CI (see #230, #220). The few | |
| # genuinely engine-specific behaviors (JSON key-order #247, temporary-table | |
| # visibility #249) are guarded per-engine in the tests via the Wpdb platform | |
| # descriptor, so every leg stays green. | |
| include: | |
| # MariaDB: floor (10.2) + current LTS (11.4). | |
| - { php: '8.1', db: 'mariadb:10.2' } | |
| - { php: '8.2', db: 'mariadb:11.4' } | |
| # MySQL: floor (5.7) + current LTS (8.4). | |
| - { php: '8.1', db: 'mysql:5.7' } | |
| - { php: '8.2', db: 'mysql:8.4' } | |
| env: | |
| TEST_PHP_VERSION: ${{ matrix.php }} | |
| WP_VERSION: '6.7' | |
| DB_IMAGE: ${{ matrix.db }} | |
| SKIP_PHPCS: 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Run PHPUnit | |
| run: bin/run-tests.sh -- --group default |