Skip to content

Commit

Permalink
Merge branch '1.2' into 1
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Sep 30, 2024
2 parents 0abc149 + f38e829 commit 752055a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
21 changes: 19 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ runs:
if [[ "${{ inputs.phpunit_fail_on_warning }}" == "true" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --fail-on-warning"
fi
# --exclude-filter added in PHPUnit 11
if (( "$INT_VERSION" >= 110300 )); then
# Special filtering for silverstripe/framework testsuites
if [[ "$PHPUNIT_SUITE" == "framework-orm" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --filter /ORM/"
fi
if [[ "$PHPUNIT_SUITE" == "framework-core" ]]; then
PHPUNIT_OPTIONS="$PHPUNIT_OPTIONS --exclude-filter /ORM/"
fi
fi
echo "PHPUNIT_OPTIONS is $PHPUNIT_OPTIONS"
vendor/bin/phpunit $PHPUNIT_OPTIONS
echo "Passed"
Expand Down Expand Up @@ -195,6 +206,13 @@ runs:
echo "Missing .nvmrc"
exit 1
fi
# Set nvmdir explicitly before installation. Default dir doesn't work for some reason.
export NVM_DIR="${HOME}/.nvm"
# Installation fails if install dir is specified but doesn't exist
if ! [[ -d "$NVM_DIR" ]]; then
echo "NVM_DIR '$NVM_DIR' doesn't exist - creating it now"
mkdir $NVM_DIR
fi
# Remove any sneaky attempts to put __install-nvm.sh into pull-requests
if [[ -f __install-nvm.sh ]]; then
rm __install-nvm.sh
Expand All @@ -207,9 +225,8 @@ runs:
echo "Error while installing nvm"
exit 1
fi
export NVM_DIR="$HOME/.nvm"
# this loads nvm into the current terminal
[[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh"
[[ -s "$NVM_DIR/nvm.sh" ]] && \. "$NVM_DIR/nvm.sh" --no-use
ADMIN_NPM_VERSION=
if [[ -d vendor/silverstripe/admin ]]; then
cd vendor/silverstripe/admin
Expand Down
4 changes: 2 additions & 2 deletions install-nvm.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh
php -r '
$hash = "dd4b116a7452fc3bb8c0e410ceac27e19b0ba0f900fe2f91818a95c12e92130fdfb8170fec170b9fb006d316f6386f2b";
$hash = "faff9a72a1c8a202d6ad9b79e124684a8b128a0b3f44bdff0898bb6f4ca18550178cc7d435cfe10b2cc37396075b338d";
if (hash_file("sha384", "install.sh") === $hash) {
echo "Installer verified";
} else {
Expand Down

0 comments on commit 752055a

Please sign in to comment.