Auto-merge master back to develop #19
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: Testing Integration | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
pull_request: | |
branches: | |
- develop | |
- master | |
paths: | |
- '**.php' | |
- '.github/workflows/*.yml' | |
- '!docs/**' | |
# Cancel previous workflow run groups that have not completed. | |
concurrency: | |
# Group workflow runs by workflow name, along with the head branch ref of the pull request | |
# or otherwise the branch or tag ref. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
continuous_integration: | |
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }} ${{ matrix.multisite && 'Multisite' || '' }} ${{ matrix.coverage && '(Coverage)' || '' }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '8.2', '8.1' ] | |
wordpress: [ '6.5', '6.4', '6.3', '6.2', '6.1' ] | |
multisite: [ false ] | |
include: | |
# Latest WordPress + PHP. | |
- wordpress: '6.5' | |
php: '8.3' | |
coverage: 1 | |
- wordpress: '6.5' | |
php: '8.3' | |
multisite: true | |
# Lowest PHP version for WordPress versions in matrix. | |
- wordpress: '6.4' | |
php: '8.0' | |
- wordpress: '6.3' | |
php: '8.0' | |
- wordpress: '6.2' | |
php: '8.0' | |
- wordpress: '6.1' | |
php: '7.4' | |
# Older WordPress versions with highest + lowest PHP versions. | |
- wordpress: '6.0' | |
php: '8.1' | |
- wordpress: '6.0' | |
php: '7.4' | |
- wordpress: '5.9' | |
php: '8.1' | |
- wordpress: '5.9' | |
php: '7.3' | |
# Minimum plugin requirement: | |
- wordpress: '5.5' # Keeps compatibility with our test env. | |
php: '7.3' # Our build script requires PHP 7.3+. | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
extensions: json, mbstring | |
- name: Install dependencies | |
uses: ramsey/composer-install@v3 | |
with: | |
composer-options: "--no-dev" | |
- name: Build "testing" Docker Image | |
env: | |
PHP_VERSION: ${{ matrix.php }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
run: composer build-test | |
- name: Run Functional Tests w/ Docker. | |
env: | |
COVERAGE: ${{ matrix.coverage }} | |
USING_XDEBUG: ${{ matrix.coverage }} | |
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG || matrix.debug }} | |
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }} | |
SUITES: functional | |
PHP_VERSION: ${{ matrix.php }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
run: composer run-test | |
- name: Run WPUnit Tests w/ Docker. | |
env: | |
COVERAGE: ${{ matrix.coverage }} | |
USING_XDEBUG: ${{ matrix.coverage }} | |
DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG || matrix.debug }} | |
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }} | |
PHP_VERSION: ${{ matrix.php }} | |
WP_VERSION: ${{ matrix.wordpress }} | |
MULTISITE: ${{ matrix.multisite }} | |
run: composer run-test | |
- name: Push Codecoverage to Coveralls.io | |
if: ${{ matrix.coverage == 1 }} | |
env: | |
COVERALLS_RUN_LOCALLY: 1 | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: vendor/bin/php-coveralls -v |