PHP/WP and Cypress - Start web server #360
-
I'm new to this so please go easy on me! Not sure where my bottleneck is so thought I'd try asking here first. Basically, I want to create a workflow for browser testing a WP Plugin. The GH repo would be the plugin itself. I'm trying to:
The last step is failing as Cypress is getting a 404. I'm thinking I need to start a PHP server? Do I need to use nginx service maybe? I'm not sure so if anyone has a tip I'm all ears. I'll try anything. Here's where I am now: https://github.com/KevinBatdorf/gh-action-wp/runs/1521814526?check_suite_focus=true |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @KevinBatdorf,
name: Run PHP server
run: nohup php -S localhost:8080 > php.log 2>&1 &
- uses: cypress-io/github-action@v2
with:
install: false
env:
CYPRESS_baseUrl: http://localhost:8080/index.php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'
extensions: mysql, zip
coverage: none
tools: composer, wp-cli diff - shivammathur/test-setup-php@6898e9c |
Beta Was this translation helpful? Give feedback.
Hi @KevinBatdorf,
Here are some changes you should do in your workflow
CYPRESS_baseUrl
instead ofCYPRESS_port
incypress-io/github-action
step.wp-cli
, so you can specify it in tools input and removeDownload WP-CLI
andInstall WP-CLI
steps.