Fix remaining issues: update Cypress tests to work directly with WordPress, fix Markdown formatting

This commit is contained in:
2025-04-22 16:46:36 +01:00
parent 8fa2c19fe4
commit fa92ca58df
4 changed files with 68 additions and 73 deletions

View File

@@ -37,8 +37,8 @@ jobs:
# Add your linting command here when you have one
# For example: npm run lint
playground-test:
name: WordPress Playground Tests
playground-single-test:
name: WordPress Playground Single Site Tests
runs-on: ubuntu-latest
needs: code-quality
@@ -74,6 +74,43 @@ jobs:
# Run Cypress tests against WordPress Playground
npx cypress run --config specPattern=cypress/e2e/playground-single-site.cy.js
playground-multisite-test:
name: WordPress Playground Multisite Tests
runs-on: ubuntu-latest
needs: [code-quality, playground-single-test]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install WordPress Playground CLI
run: npm install -g @wp-playground/cli
- name: Create plugin zip
run: |
mkdir -p dist
zip -r dist/plugin.zip . -x "node_modules/*" "dist/*" ".git/*"
- name: Run tests with WordPress Playground
run: |
# Start WordPress Playground with our blueprint
npx @wp-playground/cli server --blueprint playground/multisite-blueprint.json --port 8889 --login &
# Wait for WordPress Playground to be ready
echo "Waiting for WordPress Playground to be ready..."
timeout 60 bash -c 'until curl -s http://localhost:8889; do sleep 2; done'
# Run Cypress tests against WordPress Playground
npx cypress run --config specPattern=cypress/e2e/playground-multisite.cy.js,baseUrl=http://localhost:8889
performance-test:
name: WordPress Performance Tests
runs-on: ubuntu-latest