[SITE-5139] Add a command to run the post metakey migration script #24
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 | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| phpunit-84: | |
| name: PHP 8.4 Unit Tests | |
| runs-on: ubuntu-latest | |
| services: | |
| database: | |
| image: mysql:latest | |
| env: | |
| MYSQL_DATABASE: content_publisher_tests | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - 3306:3306 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 | |
| - name: Setup PHP 8.4 | |
| uses: shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f | |
| with: | |
| php-version: "8.4" | |
| extensions: mysqli | |
| tools: composer,wp-cli | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 | |
| with: | |
| path: | | |
| ~/.composer/cache | |
| vendor | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --no-progress --prefer-dist --no-scripts --no-ansi | |
| - name: Setup test | |
| run: bash bin/install-wp-tests.sh --dbname=content_publisher_tests --dbuser=root --dbpass=root --dbhost=127.0.0.1 --version=latest --tmpdir=/tmp --skip-db=true | |
| - name: Run tests | |
| run: vendor/bin/phpunit |