Skip to content

Merge pull request #83 from Automattic/dependabot/github_actions/acti… #38

Merge pull request #83 from Automattic/dependabot/github_actions/acti…

Merge pull request #83 from Automattic/dependabot/github_actions/acti… #38

Workflow file for this run

name: Integration Tests
on:
push:
branches:
- develop
- main
paths:
- '**.php'
- 'composer.json'
- 'phpunit.xml.dist'
- '.wp-env.json'
- '.github/workflows/integrations.yml'
pull_request:
branches:
- develop
- main
paths:
- '**.php'
- 'composer.json'
- 'phpunit.xml.dist'
- '.wp-env.json'
- '.github/workflows/integrations.yml'
workflow_dispatch:
# Cancel previous runs of this workflow if a new one is triggered.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
integration-tests:
name: WP ${{ matrix.wordpress }} on PHP ${{ matrix.php }}${{ matrix.multisite && ' (MS)' || '' }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
# Check lowest supported WP version, with the lowest supported PHP.
- wordpress: '6.4'
php: '8.1'
# Check latest WP with the latest PHP.
- wordpress: 'master'
php: 'latest'
env:
WP_ENV_CORE: WordPress/WordPress#${{ matrix.wordpress }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v4.4.0
with:
node-version: 20
cache: npm
- name: Install Node.js dependencies
run: npm ci
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.34.0
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0
- name: Start wp-env
run: npm run wp-env start
- name: Run integration tests (single site)
if: ${{ ! matrix.multisite }}
run: composer test:integration
- name: Run integration tests (multisite)
if: ${{ matrix.multisite }}
run: composer test:integration-ms