Skip to content

Merge pull request #2814 from woocommerce/tweak/tab-nav-product-sets #855

Merge pull request #2814 from woocommerce/tweak/tab-nav-product-sets

Merge pull request #2814 from woocommerce/tweak/tab-nav-product-sets #855

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
run: ./bin/install-wp-tests.sh wordpress_test root root localhost ${{ matrix.wp-version }}
- name: Run PHP unit tests
run: composer test-unit