E2E Tests #48
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: 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 |