From f2454b05de707f7a8c64d180a872cf68d6d1d0bf Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 19 Nov 2024 10:40:58 -0300 Subject: [PATCH 1/5] Fix e2e tests with older versions of WP --- bin/setup-cypress-env.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/setup-cypress-env.sh b/bin/setup-cypress-env.sh index c3a33f13fa..2a94a7e62f 100755 --- a/bin/setup-cypress-env.sh +++ b/bin/setup-cypress-env.sh @@ -54,6 +54,9 @@ else ./bin/wp-env-cli tests-wordpress "wp --allow-root plugin install woocommerce --activate --version=${WC_VERSION}" fi +# Set twentytwentyone as the active theme here, as 2025 won't work with WP 6.0 +./bin/wp-env-cli tests-wordpress "wp --allow-root theme enable twentytwentyone --network --activate" + if [ ! -z $WP_VERSION ]; then ./bin/wp-env-cli tests-wordpress "wp --allow-root core update --version=${WP_VERSION} --force" fi @@ -94,8 +97,6 @@ fi ./bin/wp-env-cli tests-wordpress "wp --allow-root option set home 'http://localhost:8889'" ./bin/wp-env-cli tests-wordpress "wp --allow-root option set siteurl 'http://localhost:8889'" -./bin/wp-env-cli tests-wordpress "wp --allow-root theme enable twentytwentyone --network --activate" - ./bin/wp-env-cli tests-wordpress "wp --allow-root import /var/www/html/wp-content/uploads/content-example.xml --authors=create" ./bin/wp-env-cli tests-wordpress "wp --allow-root plugin deactivate woocommerce elasticpress-proxy" From 790f50506f924582328fd55ac81881a46445554c Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 19 Nov 2024 10:51:16 -0300 Subject: [PATCH 2/5] Fix command call --- bin/setup-cypress-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/setup-cypress-env.sh b/bin/setup-cypress-env.sh index 2a94a7e62f..f0d80487a4 100755 --- a/bin/setup-cypress-env.sh +++ b/bin/setup-cypress-env.sh @@ -55,7 +55,7 @@ else fi # Set twentytwentyone as the active theme here, as 2025 won't work with WP 6.0 -./bin/wp-env-cli tests-wordpress "wp --allow-root theme enable twentytwentyone --network --activate" +./bin/wp-env-cli tests-wordpress "wp --allow-root theme activate twentytwentyone" if [ ! -z $WP_VERSION ]; then ./bin/wp-env-cli tests-wordpress "wp --allow-root core update --version=${WP_VERSION} --force" From cc3672d3b83cd51f5519ece8d2c44483f9558cc1 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 19 Nov 2024 12:44:45 -0300 Subject: [PATCH 3/5] Fix selectors for WP 6.7 --- tests/cypress/support/commands/block-editor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/cypress/support/commands/block-editor.js b/tests/cypress/support/commands/block-editor.js index 5cb8543450..d68d7c32f7 100644 --- a/tests/cypress/support/commands/block-editor.js +++ b/tests/cypress/support/commands/block-editor.js @@ -106,8 +106,12 @@ Cypress.Commands.add('supportsBlockTypography', { prevSubject: true }, (subject, cy.get('@fontSizeButton').click(); cy.get('@fontSizeButton').type('{esc}'); - cy.get('.block-editor-block-inspector button[aria-label="Font size"]').click(); - cy.get('.block-editor-block-inspector li[role="option"]') + cy.get( + '.block-editor-block-inspector fieldset.components-font-size-picker button[role="combobox"]', + ).click(); + cy.get( + '.block-editor-block-inspector li[role="option"], .block-editor-block-inspector div[role="option"]', + ) .contains('Extra small') .click(); From bcd92b4c7829a5262feaf4f2e20b4cc29c65ff00 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 19 Nov 2024 13:56:16 -0300 Subject: [PATCH 4/5] Update GitHub Actions --- .github/workflows/build-and-tag.yml | 4 ++-- .github/workflows/build-docs.yml | 4 ++-- .github/workflows/build-with-vendor-prefixed.yml | 4 ++-- .github/workflows/cypress-tests.yml | 16 ++++++++-------- .github/workflows/lint.yml | 10 +++++----- .github/workflows/push-asset-readme-update.yml | 2 +- .github/workflows/push-deploy.yml | 2 +- .github/workflows/test.yml | 4 ++-- .github/workflows/wordpress-latest.yml | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-and-tag.yml b/.github/workflows/build-and-tag.yml index 397faedea0..2aaad8831a 100644 --- a/.github/workflows/build-and-tag.yml +++ b/.github/workflows/build-and-tag.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set PHP version uses: shivammathur/setup-php@v2 @@ -23,7 +23,7 @@ jobs: run: composer install - name: install node v18 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index d2cab33acd..581cff7705 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: 'wp-content/plugins/elasticpress' @@ -55,7 +55,7 @@ jobs: wp cli-command-docs elasticpress --custom-order=sync,activate-feature,deactivate-feature,list-features,get-algorithm-version,set-algorithm-version --remove=delete_transient_on_int,custom_get_transient,stop_on_failed_mapping,call_ep_cli_put_mapping,should_interrupt_sync,index_output,get-indexes,get-cluster-indexes,index,clear-index,get-indexing-status,get-last-cli-index,stop-indexing --custom-intro='The following WP-CLI commands are supported by ElasticPress:' > wp-content/plugins/elasticpress/docs/wp-cli.md - name: Use Node.js 18 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '18' diff --git a/.github/workflows/build-with-vendor-prefixed.yml b/.github/workflows/build-with-vendor-prefixed.yml index dd9aaeddae..396e5b6617 100644 --- a/.github/workflows/build-with-vendor-prefixed.yml +++ b/.github/workflows/build-with-vendor-prefixed.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set PHP version uses: shivammathur/setup-php@v2 @@ -25,7 +25,7 @@ jobs: run: composer install - name: install node v18 - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 18 diff --git a/.github/workflows/cypress-tests.yml b/.github/workflows/cypress-tests.yml index bbeff1bb44..1d518d2562 100644 --- a/.github/workflows/cypress-tests.yml +++ b/.github/workflows/cypress-tests.yml @@ -33,10 +33,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare npm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.NODE_CACHE }} key: npm-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} @@ -44,7 +44,7 @@ jobs: npm-${{ env.NODE_VERSION }}- - name: Prepare composer cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE }} key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} @@ -63,7 +63,7 @@ jobs: run: composer install - name: "Install node v${{ env.NODE_VERSION }}" - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} @@ -122,10 +122,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare npm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.NODE_CACHE }} key: npm-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} @@ -133,7 +133,7 @@ jobs: npm-${{ env.NODE_VERSION }}- - name: Prepare composer cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE }} key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} @@ -152,7 +152,7 @@ jobs: run: composer install - name: "Install node v${{ env.NODE_VERSION }}" - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ae94179cf0..88808b9086 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,14 +22,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set standard 10up cache directories run: | sudo npm config set cache "${{ env.NODE_CACHE }}" --global - name: Prepare npm cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.NODE_CACHE }} key: npm-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }} @@ -37,7 +37,7 @@ jobs: npm-${{ env.NODE_VERSION }}- - name: "install node v${{ env.NODE_VERSION }}" - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} @@ -56,14 +56,14 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set standard 10up cache directories run: | composer config -g cache-dir "${{ env.COMPOSER_CACHE }}" - name: Prepare composer cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE }} key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/push-asset-readme-update.yml b/.github/workflows/push-asset-readme-update.yml index 4098203a80..1e0cf6430a 100644 --- a/.github/workflows/push-asset-readme-update.yml +++ b/.github/workflows/push-asset-readme-update.yml @@ -8,7 +8,7 @@ jobs: name: Push to trunk runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@stable env: diff --git a/.github/workflows/push-deploy.yml b/.github/workflows/push-deploy.yml index a4d98ff6c3..4cc47d2a49 100644 --- a/.github/workflows/push-deploy.yml +++ b/.github/workflows/push-deploy.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: WordPress Plugin Deploy if: "! github.event.release.prerelease" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69b8808091..69d5e1b93a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Start MySQL run: sudo systemctl start mysql.service @@ -46,7 +46,7 @@ jobs: composer config -g cache-dir "${{ env.COMPOSER_CACHE }}" - name: Prepare composer cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE }} key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/wordpress-latest.yml b/.github/workflows/wordpress-latest.yml index b134ea59da..040d978673 100644 --- a/.github/workflows/wordpress-latest.yml +++ b/.github/workflows/wordpress-latest.yml @@ -15,6 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - name: WordPress version checker - uses: skaut/wordpress-version-checker@v1.2.0 + uses: skaut/wordpress-version-checker@v2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} From c0c961fb3cdd07b2bd74c6a2426f2e5ef0de9906 Mon Sep 17 00:00:00 2001 From: Felipe Elia Date: Tue, 19 Nov 2024 13:58:00 -0300 Subject: [PATCH 5/5] Fix WP Latest version --- .github/workflows/wordpress-latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wordpress-latest.yml b/.github/workflows/wordpress-latest.yml index 040d978673..d773a7eacd 100644 --- a/.github/workflows/wordpress-latest.yml +++ b/.github/workflows/wordpress-latest.yml @@ -15,6 +15,6 @@ jobs: runs-on: ubuntu-latest steps: - name: WordPress version checker - uses: skaut/wordpress-version-checker@v2 + uses: skaut/wordpress-version-checker@v2.2.2 with: repo-token: ${{ secrets.GITHUB_TOKEN }}