Skip to content

Commit

Permalink
Always determine WP version
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Jan 23, 2025
1 parent 5263cee commit 16fdf6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
13 changes: 0 additions & 13 deletions .github/files/setup-wordpress-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,6 @@ for PLUGIN in projects/plugins/*/composer.json; do
fi
cd "$BASE"

# Upgrade/downgrade WorDBless if necessary.
if [[ ( "$WP_BRANCH" == 'trunk' || "$WP_BRANCH" == 'previous' ) && "$TEST_SCRIPT" == "test-php" ]]; then
VER=$(composer --format=json --working-dir="$DIR" show | jq -r '.installed[] | select( .name == "roots/wordpress" ) | .version')
if [[ -n "$VER" ]]; then
INSVER=$WORDPRESS_TAG
[[ "$WORDPRESS_TAG" == 'trunk' ]] && INSVER="dev-main as $VER"
echo "Supposed to run tests against WordPress $WORDPRESS_TAG, so setting roots/wordpress and roots/wordpress-no-content to \"$INSVER\""
# Composer seems to sometimes have issues with deleting the wordpress dir on its own, so do it manually first.
rm -rf "$DIR/wordpress"
composer --working-dir="$DIR" require --dev roots/wordpress="$INSVER" roots/wordpress-no-content="$INSVER"
fi
fi

cp -r "$DIR" "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/$NAME"
# Plugin dir for tests in WP >= 5.6-beta1
ln -s "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/$NAME" "/tmp/wordpress-$WP_BRANCH/tests/phpunit/data/plugins/$NAME"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ jobs:
echo "any-plugins=${ANY_PLUGINS}" >> "$GITHUB_OUTPUT"
- name: Select WordPress version
if: steps.changed.outputs.any-plugins != 'false' && matrix.wp != 'none'
run: .github/files/select-wordpress-tag.sh

- name: Composer Install
Expand Down

0 comments on commit 16fdf6f

Please sign in to comment.