Skip to content

Remove the setting to change the post formats in the main query loop … #957

Remove the setting to change the post formats in the main query loop …

Remove the setting to change the post formats in the main query loop … #957

Workflow file for this run

name: Friends
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: "7.2"
phpunit: "6.3.1"
wordpress: "6.0"
- php: "7.2"
phpunit: "6.3.1"
wordpress: "trunk"
- php: "7.3"
phpunit: "7.2.7"
wordpress: "6.0"
- php: "7.4"
phpunit: "8.1.6"
wordpress: "trunk"
- php: "8.0"
phpunit: "8.5.16"
wordpress: "trunk"
- php: "8.1"
phpunit: "9.6.21"
wordpress: "trunk"
- php: "8.2"
phpunit: "9.6.21"
wordpress: "trunk"
- php: "8.3"
phpunit: "9.6.21"
wordpress: "trunk"
- php: "8.4"
phpunit: "9.6.21"
wordpress: "trunk"
services:
mariadb:
image: mariadb:lts
ports:
- 3306
env:
MYSQL_ROOT_PASSWORD: wordpress
MYSQL_DATABASE: wordpress_test
name: "Tests: PHP ${{ matrix.php }} - PHPUnit: ${{matrix.phpunit}} - WordPress: ${{matrix.wordpress}}"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP with tools
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mysql
tools: phpunit-polyfills composer
ini-values: error_reporting=E_ALL, display_errors=On
coverage: none
- name: Install svn
run: sudo apt-get install subversion
- name: Shutdown default MySQL service
run: sudo service mysql stop
- name: Verify MariaDB connection
run: |
while ! mysqladmin ping -h"127.0.0.1" -P"${{ job.services.mariadb.ports[3306] }}" --silent; do
sleep 1
done
- name: "Composer: set PHPUnit version for tests"
if: ${{ matrix.phpunit != 'auto' }}
run: composer require --dev --no-update phpunit/phpunit:"${{ matrix.phpunit }}"
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-composer-dependencies
- name: Install Composer dependencies for PHP < 8.2
if: ${{ matrix.php < 8.2 }}
uses: "ramsey/composer-install@v2"
# For PHP 8.2 and above, we need to install with ignore platform reqs as not all dependencies allow it yet.
- name: Install Composer dependencies for PHP >= 8.2
if: ${{ matrix.php >= 8.2 }}
uses: "ramsey/composer-install@v2"
with:
composer-options: --ignore-platform-reqs
# Scan the logs for failing tests and surface that information by creating annotations and log file decorations.
- name: Setup problem matcher to provide annotations for PHPUnit test errors and failures
# The JSON file is provided by the `shivammathur/setup-php` action. See https://github.com/shivammathur/setup-php#problem-matchers.
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install the test environment
run: bash bin/install-wp-tests.sh wordpress_test root wordpress 127.0.0.1:${{ job.services.mariadb.ports[3306] }} ${{ matrix.wordpress }} true
- name: Run the unit tests
run: composer test
- name: Run the multisite unit tests
env:
WP_MULTISITE: 1
run: composer test