From 94467d1b771f3a29674d7328e2a7d04bf46b14c9 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Sat, 28 Sep 2024 21:14:02 +0200 Subject: [PATCH] Run e2e tests against Gutenberg plugin --- .github/workflows/e2e-tests.yml | 22 ++++++++++++++++++++++ .wp-env.json | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index e9fc827b..239530d9 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -38,6 +38,22 @@ jobs: - wp: 'trunk' shard: '4/4' experimental: true + - wp: 'trunk' + gutenberg: true + shard: '1/4' + experimental: true + - wp: 'trunk' + gutenberg: true + shard: '2/4' + experimental: true + - wp: 'trunk' + gutenberg: true + shard: '3/4' + experimental: true + - wp: 'trunk' + gutenberg: true + shard: '4/4' + experimental: true steps: - name: Checkout @@ -71,8 +87,14 @@ jobs: chmod -R 767 ./ npm run wp-env start + + if [[ $GUTENBERG != 'true' ]]; then + echo "Deactivating Gutenberg plugin" + npm run wp-env --silent -- run tests-cli wp plugin deactivate gutenberg + fi env: WP_VERSION: ${{ matrix.wp }} + GUTENBERG: ${{ matrix.gutenberg == 'true' }} - name: Run tests run: | diff --git a/.wp-env.json b/.wp-env.json index 873c8de3..b132d8cd 100644 --- a/.wp-env.json +++ b/.wp-env.json @@ -1,6 +1,9 @@ { "core": null, - "plugins": [ "." ], + "plugins": [ + ".", + "https://downloads.wordpress.org/plugin/gutenberg.latest-stable.zip" + ], "mappings": { "wp-content/mu-plugins": "./tests/e2e/mu-plugins" },