Skip to content

Commit

Permalink
[CMSP-721] Ensure Behat tests are run on PHP 8.3 site environment (#283)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jazzsequence authored Nov 16, 2023
1 parent f3b04da commit 552d36c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
20 changes: 0 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -81,4 +62,3 @@ jobs:
- run:
command: ./bin/behat-cleanup.sh
when: always

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion bin/behat-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

###
Expand All @@ -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
###
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 552d36c

Please sign in to comment.