-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into delete/4710-remove-deposit_status
- Loading branch information
Showing
12 changed files
with
194 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: minor | ||
Type: dev | ||
|
||
Add command to run QIT PHPStan tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: update | ||
|
||
Update XPF currency formatting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
cwd=$(pwd) | ||
WCP_ROOT=$cwd | ||
QIT_ROOT="$cwd/tests/qit" | ||
EXTENSION_NAME="woocommerce-payments" | ||
|
||
#Load local env variables if present. | ||
if [[ -f "$QIT_ROOT/config/local.env" ]]; then | ||
. "$QIT_ROOT/config/local.env" | ||
fi | ||
|
||
# Check if QIT_USER and QIT_APP_PASSWORD are set and not empty | ||
if [[ -z $QIT_USER ]] || [[ -z $QIT_PASSWORD ]]; then | ||
echo "QIT_USER or QIT_APP_PASSWORD environment variables are not set or empty. Please set them in the local env file before running the script." | ||
exit 1 | ||
fi | ||
|
||
export QIT_DISABLE_ONBOARDING=yes | ||
|
||
# If QIT_BINARY is not set, default to ./vendor/bin/qit | ||
QIT_BINARY=${QIT_BINARY:-./vendor/bin/qit} | ||
|
||
# Add the partner by validating credentials. | ||
if ! $QIT_BINARY list | grep -q 'partner:remove'; then | ||
echo "Adding partner with QIT credentials..." | ||
$QIT_BINARY partner:add --user=$QIT_USER --application_password=$QIT_PASSWORD | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to add partner. Exiting with status 1." | ||
exit 1 | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Get the directory of the current script | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Source common.sh using the relative path | ||
source "$DIR/common.sh" | ||
|
||
echo "Running PHPStan tests..." | ||
$QIT_BINARY run:phpstan woocommerce-payments --wait | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to run PHPStan command. Exiting with status 1." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
# Get the directory of the current script | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
cwd=$(pwd) | ||
WCP_ROOT=$cwd | ||
QIT_ROOT="$cwd/tests/qit" | ||
EXTENSION_NAME="woocommerce-payments" | ||
# Source common.sh using the relative path | ||
source "$DIR/common.sh" | ||
|
||
#Load local env variables if present. | ||
if [[ -f "$QIT_ROOT/config/local.env" ]]; then | ||
. "$QIT_ROOT/config/local.env" | ||
fi | ||
|
||
# Check if QIT_USER and QIT_APP_PASSWORD are set and not empty | ||
if [[ -z $QIT_USER ]] || [[ -z $QIT_PASSWORD ]]; then | ||
echo "QIT_USER or QIT_APP_PASSWORD environment variables are not set or empty. Please set them in the local env file before running the script." | ||
exit 1 | ||
fi | ||
|
||
export QIT_DISABLE_ONBOARDING=yes | ||
|
||
# If QIT_BINARY is not set, default to ./vendor/bin/qit | ||
QIT_BINARY=${QIT_BINARY:-./vendor/bin/qit} | ||
|
||
# Add the partner by validating credentials. | ||
if ! $QIT_BINARY list | grep -q 'partner:remove'; then | ||
echo "Adding partner with QIT credentials..." | ||
$QIT_BINARY partner:add --user=$QIT_USER --application_password=$QIT_PASSWORD | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to add partner. Exiting with status 1." | ||
exit 1 | ||
fi | ||
fi | ||
|
||
# Run the security command | ||
echo "Running security tests..." | ||
$QIT_BINARY run:security woocommerce-payments --zip=woocommerce-payments.zip --wait | ||
if [ $? -ne 0 ]; then | ||
echo "Failed to run security command. Exiting with status 1." | ||
exit 1 | ||
echo "Failed to run security command. Exiting with status 1." | ||
exit 1 | ||
fi |