Skip to content

Improve the single response view #77

Improve the single response view

Improve the single response view #77

Workflow file for this run

name: Unit Tests
on:
pull_request:
jobs:
test-php:
name: PHP ${{matrix.php}}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.wordpress != '' && format( ' (WP {0}) ', matrix.wordpress ) || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php:
- "7.4"
- "8.0"
- "8.1"
- "8.2"
multisite: [false]
wordpress: ["6.4","6.3"]
env:
WP_ENV_PHP_VERSION: ${{ matrix.php }}
WP_ENV_CORE: ${{ format( 'https://wordpress.org/wordpress-{0}.zip', matrix.wordpress ) }}
steps:
- uses: actions/checkout@v3
- name: Restore npm dependency cache
uses: ./.github/actions/restore-npm-cache
- run: npm install
- name: Build scripts
run: npm run build
- name: Install PHP-Scoper
run: composer global require humbug/php-scoper
- name: Add Composer bin to PATH
run: echo "$HOME/.composer/vendor/bin/" >> $GITHUB_PATH
- name: Run PHP-Scoper
run: composer run phpscoper
- name: Install composer dependencies
run: composer install
- name: Start Docker environment
run: npm run wp-env start
- name: Running single site unit tests
if: ${{ ! matrix.multisite }}
run: |
set -o pipefail
npm run test:unit:php:base | tee phpunit.log