Release/1.4.12 #1685
Workflow file for this run
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: PHP Unit Tests | |
on: | |
push: | |
branches: | |
- trunk | |
- develop | |
paths: | |
- "**.php" | |
- composer.json | |
- composer.lock | |
- .github/workflows/php-unit-tests.yml | |
pull_request: | |
paths: | |
- "**.php" | |
- composer.json | |
- composer.lock | |
- .github/workflows/php-unit-tests.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
UnitTests: | |
name: PHP unit tests - PHP ${{ matrix.php }}, WP ${{ matrix.wp-version }} | |
runs-on: ubuntu-latest | |
env: | |
WP_CORE_DIR: "/tmp/wordpress/src" | |
WP_TESTS_DIR: "/tmp/wordpress/tests/phpunit" | |
strategy: | |
matrix: | |
php: [7.4, 8.3] | |
wp-version: [latest] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Prepare PHP | |
uses: woocommerce/grow/prepare-php@actions-v1 | |
with: | |
php-version: "${{ matrix.php }}" | |
- name: Prepare MySQL | |
uses: woocommerce/grow/prepare-mysql@actions-v1 | |
- name: Install WP tests | |
shell: bash | |
run: ./bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wp-version }} | |
- name: Run PHP unit tests | |
run: composer test-unit |