Skip to content

Commit

Permalink
just use a single test
Browse files Browse the repository at this point in the history
and we'll assume we can multidev off master still
  • Loading branch information
jazzsequence committed Nov 8, 2023
1 parent 3db6025 commit 09ce8d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 65 deletions.
57 changes: 3 additions & 54 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ workflows:
version: 2.1
main:
jobs:
- test-behat-74
- test-behat-83
- test-behat
nightly:
triggers:
- schedule:
Expand All @@ -14,10 +13,9 @@ workflows:
only:
- master
jobs:
- test-behat-74
- test-behat-83
- test-behat
jobs:
test-behat-74:
test-behat:
resource_class: small
working_directory: ~/pantheon-systems/wp-native-php-sessions
parallelism: 1
Expand All @@ -41,55 +39,6 @@ jobs:
echo 'export WORDPRESS_ADMIN_USERNAME=pantheon' >> $BASH_ENV
echo 'export [email protected]' >> $BASH_ENV
echo 'export WORDPRESS_ADMIN_PASSWORD=$(cat /tmp/WORDPRESS_ADMIN_PASSWORD)' >> $BASH_ENV
echo 'export PHP_VERSION=7.4' >> $BASH_ENV
source $BASH_ENV
- run: echo "StrictHostKeyChecking no" >> "$HOME/.ssh/config"
- run: |
if [ -z "$GITHUB_TOKEN" ]; then
echo "GITHUB_TOKEN environment variables missing; assuming unauthenticated build"
exit 0
fi
echo "Setting GitHub OAuth token with suppressed ouput"
{
composer config -g github-oauth.github.com $GITHUB_TOKEN
} &> /dev/null
- run: |
if [ -z "$TERMINUS_TOKEN" ]; then
echo "TERMINUS_TOKEN environment variables missing; assuming unauthenticated build"
exit 0
fi
terminus auth:login --machine-token=$TERMINUS_TOKEN
- run: ./bin/validate-fixture-version.sh
- run: ./bin/behat-prepare.sh
- run: ./bin/behat-test.sh --strict
- run:
command: ./bin/behat-cleanup.sh
when: always
test-behat-83:
resource_class: small
working_directory: ~/pantheon-systems/wp-native-php-sessions
parallelism: 1
docker:
- image: quay.io/pantheon-public/build-tools-ci:8.x-php8.2
steps:
- checkout
- restore_cache:
keys:
- test-behat-dependencies-{{ checksum "composer.json" }}
- run: composer install -n --prefer-dist
- save_cache:
key: test-behat-dependencies-{{ checksum "composer.json" }}
paths:
- vendor
- run: echo $(openssl rand -hex 8) > /tmp/WORDPRESS_ADMIN_PASSWORD
- run: |
echo 'export TERMINUS_ENV=ci-$CIRCLE_BUILD_NUM' >> $BASH_ENV
echo 'export TERMINUS_SITE=wp-native-php-sessions' >> $BASH_ENV
echo 'export SITE_ENV=wp-native-php-sessions.ci-$CIRCLE_BUILD_NUM' >> $BASH_ENV
echo 'export WORDPRESS_ADMIN_USERNAME=pantheon' >> $BASH_ENV
echo 'export [email protected]' >> $BASH_ENV
echo 'export WORDPRESS_ADMIN_PASSWORD=$(cat /tmp/WORDPRESS_ADMIN_PASSWORD)' >> $BASH_ENV
echo 'export PHP_VERSION=8.3' >> $BASH_ENV
source $BASH_ENV
- run: echo "StrictHostKeyChecking no" >> "$HOME/.ssh/config"
- run: |
Expand Down
15 changes: 4 additions & 11 deletions bin/behat-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@ fi

set -ex

if [ -v PHP_VERSION ] && [ "$PHP_VERSION" == "8.3" ]; then
###
# Create a new environment for this particular test run on PHP 8.3.
###
terminus multidev:create "$TERMINUS_SITE".83 "$TERMINUS_ENV" --yes
else
###
# Create a new environment for this particular test run on PHP 7.4.
###
terminus multidev:create "$TERMINUS_SITE".dev "$TERMINUS_ENV" --yes
fi
###
# Create a new environment for this particular test run.
###
terminus multidev:create "$TERMINUS_SITE".dev "$TERMINUS_ENV" --yes
terminus env:wipe "$SITE_ENV" --yes

###
Expand Down

0 comments on commit 09ce8d8

Please sign in to comment.