Skip to content

Commit

Permalink
try running e2e tests w/ Playground in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WunderBart committed Jun 20, 2024
1 parent e226d20 commit 2f252c1
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,36 @@ jobs:
run: |
npx playwright install chromium firefox webkit --with-deps
- name: Install WordPress and start the server
- name: Checkout Playground repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: WordPress/wordpress-playground
path: playground

- name: Setup Playground and start the server
run: |
npm run wp-env start
# Install Bun
curl -fsSL https://bun.sh/install | bash # install bun
# Install the dependencies
cd playground
npm install
# Start the server
~/.bun/bin/bun packages/playground/cli/src/cli.ts server \
--wp=6.5 \
--mount=../:/wordpress/wp-content/plugins/gutenberg \
--mount=../test/gutenberg-test-themes:/wordpress/wp-content/themes/gutenberg-test-themes \
--mount=../packages/e2e-tests/mu-plugins:/wordpress/wp-content/mu-plugins \
--mount=../packages/e2e-tests/plugins:/wordpress/wp-content/plugins/gutenberg-test-plugins \
--blueprint=../test/e2e/playground.blueprint.json
- name: Run the tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:e2e -- --shard=${{ matrix.part }}/${{ matrix.totalParts }}
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- \
WP_BASE_URL=http://127.0.0.1:9400/ npm run test:e2e -- --shard=${{ matrix.part }}/${{ matrix.totalParts }}
- name: Archive debug artifacts (screenshots, traces)
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
Expand Down

0 comments on commit 2f252c1

Please sign in to comment.