Skip to content

E2E Tests

E2E Tests #48

Workflow file for this run

name: E2E Tests
on:
workflow_dispatch:
inputs:
wpVersion:
description: 'Enter WP version (eg 6.6)'
required: false
type: string
default: ''
phpVersion:
description: 'Enter PHP version (eg 8.2)'
required: false
type: string
default: '8.2'
workflow_call:
inputs:
wpVersion:
description: 'Enter WP version (eg 6.6)'
required: false
type: string
default: ''
phpVersion:
description: 'Enter PHP version (eg 8.2)'
required: false
type: string
default: '8.2'
jobs:
test:
runs-on: ubuntu-latest
env:
# trenary ${{ condition && if-value || else-value }}
INSERI_WP_CORE: ${{ inputs.wpVersion != '' && format('WordPress/WordPress#{0}', inputs.wpVersion) || '' }}
INSERI_WP_PHP: ${{ inputs.phpVersion }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- run: npm run build
- run: npx playwright install --with-deps
- run: npm run wp:set-config
- run: npx wp-env start
- run: npm run test:init
- run: npm run test:e2e