Bump yoast/phpunit-polyfills from 1.1.0 to 3.0.0 #245
This file contains 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 (PHP) | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: ci-php-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- "7.4" | |
- "8.0" | |
wpmu: | |
- "0" | |
- "1" | |
wordpress: | |
- latest | |
- trunk | |
services: | |
mysql: | |
image: mariadb:latest | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306 | |
options: --health-cmd="healthcheck.sh --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3 | |
steps: | |
- name: Check out source code | |
uses: actions/[email protected] | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer packages | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php-${{ matrix.php }} | |
${{ runner.os }}-php- | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress --no-interaction --ignore-platform-reqs | |
- name: Verify MariaDB connection | |
run: | | |
while ! mysqladmin ping -h 127.0.0.1 -P ${{ job.services.mysql.ports[3306] }} --silent; do | |
sleep 1 | |
done | |
timeout-minutes: 3 | |
- name: Install WP Test Suite | |
run: ./__tests__/bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports[3306] }} ${{ matrix.wordpress }} | |
- name: Run tests | |
run: vendor/bin/phpunit | |
env: | |
WP_MULTISITE: ${{ matrix.wpmu }} |