Refactor to filter-based architecture #15
Workflow file for this run
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: PHPUnit | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - '**/*.php' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - 'phpunit.xml.dist' | |
| - '.github/workflows/phpunit.yml' | |
| pull_request: | |
| paths: | |
| - '**/*.php' | |
| - 'composer.json' | |
| - 'composer.lock' | |
| - 'phpunit.xml.dist' | |
| - '.github/workflows/phpunit.yml' | |
| jobs: | |
| phpunit: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mariadb:10.4 | |
| env: | |
| MARIADB_ROOT_PASSWORD: root | |
| MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: true | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="healthcheck.sh --connect --innodb_initialized" | |
| --health-interval=5s | |
| --health-timeout=2s | |
| --health-retries=3 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ['7.2', '8.3'] | |
| wp-version: ['latest'] | |
| include: | |
| - php-version: '7.2' | |
| wp-version: '6.5' | |
| name: PHP ${{ matrix.php-version }} / WP ${{ matrix.wp-version }} | |
| steps: | |
| - name: Install svn | |
| run: sudo apt-get update && sudo apt-get install -y subversion | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mbstring, intl | |
| ini-values: post_max_size=256M, max_execution_time=180 | |
| coverage: none | |
| - name: Install Composer dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Setup Test Environment | |
| run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wp-version }} | |
| - name: Run PHPUnit | |
| run: vendor/bin/phpunit |