Skip to content

Refactor to extract Abilities base class #640

Refactor to extract Abilities base class

Refactor to extract Abilities base class #640

Workflow file for this run

name: PHPUnit Tests
on:
push:
branches:
- trunk
- 'branch/*'
pull_request:
branches:
- trunk
- 'branch/*'
jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
event: ['${{ github.event_name }}']
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
exclude:
# On PRs: only test minimum and latest PHP versions
- event: 'pull_request'
php: '8.0'
- event: 'pull_request'
php: '8.1'
- event: 'pull_request'
php: '8.2'
- event: 'pull_request'
php: '8.3'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: composer:v2
- name: Install dependencies
run: |
composer install --no-progress --prefer-dist --no-interaction
- name: Run PHPUnit with coverage
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: WordPress/secure-custom-fields
files: ./coverage.xml
flags: phpunit
name: phpunit-php-${{ matrix.php }}