Skip to content

Cypress E2E Tests

Cypress E2E Tests #19

Workflow file for this run

name: E2E Testing
on:
push:
branches:
- stable
- develop
pull_request:
branches:
- stable
- develop
jobs:
cypress:
name: ${{ matrix.core.name }} / ${{ matrix.php.name }}
## Pending upgrade of `@wordpress/env` package.
continue-on-error: ${{ matrix.core.version == 'WordPress/WordPress#master' }}
runs-on: ubuntu-latest
strategy:
matrix:
php:
- {name: 'PHP Default', version: null}
core:
- {name: 'WP stable', version: 'latest'}
- {name: 'WP 5.9', version: 'WordPress/WordPress#5.9'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
include:
- php: {name: 'PHP 7.1', version: '7.1'}
core: {name: 'WP 5.9', version: 'WordPress/WordPress#5.9'}
- php: {name: 'PHP 8.3', version: '8.3'}
core: {name: 'WP stable', version: 'latest'}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Set the core version
run: |
./tests/bin/set-core-version.js ${{ matrix.core.version }} ${{ matrix.php.version }}
- name: Set up WP environment
run: npm run env:start
- name: Log WP environment versions
run: |
npx wp-env run cli "wp core version"
npx wp-env run cli "php --version"
- name: Test
run: npm run cypress:run