Skip to content

PHP/WP and Cypress - Start web server #360

Discussion options

You must be logged in to vote

Hi @KevinBatdorf,
Here are some changes you should do in your workflow

  1. Yes, you need to start the PHP server before running Cypress.
name: Run PHP server
run: nohup php -S localhost:8080 > php.log 2>&1 &
  1. Specify CYPRESS_baseUrl instead of CYPRESS_port in cypress-io/github-action step.
- uses: cypress-io/github-action@v2
  with:
    install: false
  env:
    CYPRESS_baseUrl: http://localhost:8080/index.php
  1. Setup PHP supports installing wp-cli, so you can specify it in tools input and remove Download WP-CLI and Install WP-CLI steps.
- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
    php-version: '${{ matrix.php }}'
    extensions: mysql, zip
    coverage: none
    tools: c…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KevinBatdorf
Comment options

Answer selected by KevinBatdorf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants