Skip to content

Add multi-author post editing via shared invite links #7

Add multi-author post editing via shared invite links

Add multi-author post editing via shared invite links #7

Workflow file for this run

name: Tests
on:
push:
branches:
- trunk
- 'copilot/**'
pull_request:
branches:
- trunk
jobs:
# ---------------------------------------------------------------------------
# JavaScript unit tests (Jest, no Docker needed)
# ---------------------------------------------------------------------------
js-tests:
name: JS Unit Tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run JS unit tests
run: npm run test:unit
# ---------------------------------------------------------------------------
# PHP unit tests — run inside wp-env (Docker)
# ---------------------------------------------------------------------------
php-tests:
name: "PHP ${{ matrix.php }} Tests (wp-env)"
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Override PHP version
run: |
echo '{ "phpVersion": "${{ matrix.php }}" }' > .wp-env.override.json
- name: Start wp-env
run: npx wp-env start
env:
# wp-env pulls Docker images; increase timeout for CI.
WP_ENV_LIFECYCLE_TIMEOUT: 300
- name: Run PHP tests via wp-env
run: npx wp-env run tests-cli phpunit
- name: Stop wp-env
if: always()
run: npx wp-env stop