Merge pull request #5903 from Automattic/develop #8351
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: CI | |
on: | |
push: | |
branches: | |
- develop | |
- staging | |
- production | |
- gh-readonly-queue/** | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
unit-tests: | |
name: "WP ${{ matrix.config.wp }}, multisite: ${{ matrix.config.ms }}, JP: ${{ matrix.config.jp }}, PHP: ${{ matrix.config.php }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
# PHP 8.1, Jetpack | |
- { wp: 6.0.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.0.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.1.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.1.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.2.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.2.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.3.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.3.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.4.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.4.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.5.x, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: 6.5.x, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: latest, ms: 'no', jp: 'yes', php: '8.1', phpunit: '', coverage: 'yes' } | |
- { wp: latest, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '', coverage: 'yes' } | |
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.1', phpunit: '' } | |
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.1', phpunit: '' } | |
# No Jetpack, WP latest, PHP 8.1 | |
- { wp: latest, ms: 'no', jp: 'no', php: '8.1', phpunit: '' } | |
- { wp: latest, ms: 'yes', jp: 'no', php: '8.1', phpunit: '' } | |
# PHP 8.2, Jetpack | |
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.2', phpunit: '' } | |
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.2', phpunit: '' } | |
# PHP 8.3, Jetpack | |
- { wp: nightly, ms: 'no', jp: 'yes', php: '8.3', phpunit: '' } | |
- { wp: nightly, ms: 'yes', jp: 'yes', php: '8.3', phpunit: '' } | |
services: | |
mysql: | |
image: mysql:8 | |
ports: | |
- "3306:3306" | |
env: | |
MYSQL_ROOT_PASSWORD: wordpress | |
MYSQL_INITDB_SKIP_TZINFO: 1 | |
MYSQL_USER: wordpress | |
MYSQL_PASSWORD: wordpress | |
MYSQL_DATABASE: wordpress_test | |
steps: | |
- name: Check out source code | |
uses: actions/[email protected] | |
with: | |
submodules: recursive | |
- name: Prepare source code | |
uses: ./.github/actions/prepare-source | |
- name: Run tests | |
uses: ./.github/actions/run-wp-tests | |
with: | |
wordpress: ${{ matrix.config.wp }} | |
multisite: ${{ matrix.config.ms }} | |
jetpack: ${{ matrix.config.jp }} | |
php: ${{ matrix.config.php }} | |
phpunit: ${{ matrix.config.phpunit }} | |
coverage: ${{ matrix.config.coverage }} | |
codecov-token: ${{ secrets.CODECOV_TOKEN }} |