Lint markdown #172
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: Unit Tests | |
on: | |
push: | |
branches: [ master, dev ] | |
pull_request: | |
branches: [ master, dev ] | |
paths: | |
# Any change to a PHP file should run checks. | |
- '**.php' | |
# These files configure Composer. Changes could affect the outcome. | |
- 'composer.*' | |
# Changes to workflow files should always verify all workflows are successful. | |
- '.github/workflows/*.yml' | |
# Allows you to run this workflow manually from the Actions tab. | |
workflow_dispatch: | |
jobs: | |
# | |
# Creates a PHPUnit test job for each PHP/MySQL combination. | |
# | |
phpunit: | |
name: PHP ${{ matrix.php || '7.4' }} | ${{ 'mariadb' == matrix.db-type && 'MariaDB' || 'MySQL' }} | |
uses: pedro-mendonca/Translation-Stats/.github/workflows/reusable-phpunit-tests.yml@master | |
secrets: | |
codecov-token: ${{ secrets.CODECOV_TOKEN }} | |
codacy-project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Test all supported WP versions with the minumum PHP supported version. | |
php: [ '7.4' ] # 7.4 is the minimum supported version. | |
wp: | |
- '4.9' # Minimum supported version. | |
- '5.0' # Significant update with Gutenberg editor. | |
- '5.1' | |
- '5.2' | |
- '5.3' | |
- '5.4' | |
- '5.5' # Major update with new features and performance improvements. | |
- '5.6' | |
- '5.7' | |
- '5.8' # Introduction of full site editing features. | |
- '5.9' | |
- '6.0' | |
- '6.1' | |
- '6.2' | |
- '6.3' | |
- '6.4' | |
- '6.5' # Latest version. | |
include: | |
# Test the latest WP version with all PHP supported versions. | |
- php: '8.0' | |
- php: '8.1' | |
- php: '8.2' | |
- php: '8.3' | |
# Test the WP trunk with latest PHP version. Allow errors. | |
- php: 'latest' | |
wp: trunk | |
allow-errors: true | |
# Test the latest WP and PHP versions, with code coverage and remote API. | |
- php: 'latest' # Latest stable version. | |
coverage: true | |
wordpress-translate-api-tests: true | |
# Test the latest WP and PHP versions, with MariaDB database. | |
- php: 'latest' # Latest stable version. | |
db-type: 'mariadb' # Latest MariaDB version. | |
with: | |
php: ${{ matrix.php || '7.4' }} # Defaults to '7.4'. | |
wp: ${{ matrix.wp || 'latest' }} # Defaults to 'latest'. | |
db-type: ${{ matrix.db-type || 'mysql' }} # Defaults to 'mysql'. | |
multisite: ${{ matrix.multisite || false }} # Defaults to false. | |
coverage: ${{ matrix.coverage || false }} # Defaults to false. | |
allow-errors: ${{ matrix.allow-errors || false }} # Defaults to false. | |
wordpress-translate-api-tests: ${{ matrix.wordpress-translate-api-tests || false }} # Defaults to false. |