From 552d36c35f160c0dab7e09f8d97f525cfad9295c Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Thu, 16 Nov 2023 08:34:53 -0700 Subject: [PATCH] [CMSP-721] Ensure Behat tests are run on PHP 8.3 site environment (#283) * remove the run_test command already moved to GitHub Actions * update prepare and cleanup steps for php 8.3 tests * add a separate php 8.3 test * update main jobs * remove non-existant --from-env * circle ci has different run numbers so we don't need to prefix the 8.3 tests with 83 * bump tested up to version * just use a single test and we'll assume we can multidev off master still * allow nonfatal newrelic error * send subshell errors to /dev/null * pass true to continue * use &1 * Ignore the newrelic error * add PHP version to behat-prepare so we can be sure that we're on 8.3 * restore the env:create to the way it was originally * move the quote * bump tested up to to 6.4.1 * return FIXTURE_VERSION to what it was originally this will be broken until pantheon-systems/infrastructure#3574 is merged, but then we can re-run and it should work --- .circleci/config.yml | 20 -------------------- README.md | 2 +- bin/behat-prepare.sh | 5 ++++- readme.txt | 2 +- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f42f3f7..22de6b7b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,25 +14,6 @@ workflows: - master jobs: - test-behat -commands: - run_test: - steps: - - run: - name: "Run Tests" - command: | - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest - composer phpunit - WP_MULTISITE=1 composer phpunit - rm -rf $WP_TESTS_DIR $WP_CORE_DIR - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true - composer phpunit - bash bin/full-teardown-wp-tests.sh wordpress_test root '' 127.0.0.1 latest - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 latest - vendor/bin/phpunit --group=cli_command - WP_MULTISITE=1 vendor/bin/phpunit --group=cli_command - rm -rf $WP_TESTS_DIR $WP_CORE_DIR - bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 nightly true - vendor/bin/phpunit --group=cli_command jobs: test-behat: resource_class: small @@ -81,4 +62,3 @@ jobs: - run: command: ./bin/behat-cleanup.sh when: always - diff --git a/README.md b/README.md index f98d6704..ddd7bb2d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Contributors:** [getpantheon](https://profiles.wordpress.org/getpantheon), [outlandish josh](https://profiles.wordpress.org/outlandish-josh), [mpvanwinkle77](https://profiles.wordpress.org/mpvanwinkle77), [danielbachhuber](https://profiles.wordpress.org/danielbachhuber), [andrew.taylor](https://profiles.wordpress.org/andrew.taylor), [jazzs3quence](https://profiles.wordpress.org/jazzs3quence), [stovak](https://profiles.wordpress.org/stovak), [jspellman](https://profiles.wordpress.org/jspellman/), [rwagner00](https://profiles.wordpress.org/rwagner00/) **Tags:** comments, sessions **Requires at least:** 4.7 -**Tested up to:** 6.3 +**Tested up to:** 6.4.1 **Stable tag:** 1.4.3-dev **Requires PHP:** 5.4 **License:** GPLv2 or later diff --git a/bin/behat-prepare.sh b/bin/behat-prepare.sh index 6a46d5af..f62325a0 100755 --- a/bin/behat-prepare.sh +++ b/bin/behat-prepare.sh @@ -21,7 +21,7 @@ set -ex ### # Create a new environment for this particular test run. ### -terminus env:create "${TERMINUS_SITE}.dev" "$TERMINUS_ENV" +terminus env:create "${TERMINUS_SITE}.dev" "$TERMINUS_ENV" terminus env:wipe "$SITE_ENV" --yes ### @@ -32,6 +32,9 @@ PANTHEON_SITE_URL="$TERMINUS_ENV-$TERMINUS_SITE.pantheonsite.io" PREPARE_DIR="/tmp/$TERMINUS_ENV-$TERMINUS_SITE" BASH_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PHP_VERSION="$(terminus env:info "$SITE_ENV" --field=php_version)" +echo "PHP Version: $PHP_VERSION" + ### # Switch to git mode for pushing the files up ### diff --git a/readme.txt b/readme.txt index 1877f40a..3fa664e6 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: getpantheon, outlandish josh, mpvanwinkle77, danielbachhuber, andrew.taylor, jazzs3quence, stovak, jspellman, rwagner00 Tags: comments, sessions Requires at least: 4.7 -Tested up to: 6.3 +Tested up to: 6.4.1 Stable tag: 1.4.3-dev Requires PHP: 5.4 License: GPLv2 or later