-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #883 from mollie/develop
Develop-6.0.5
- Loading branch information
Showing
668 changed files
with
15,183 additions
and
27,449 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
This file was deleted.
Oops, something went wrong.
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,7 +1,11 @@ | ||
FROM prestashop/prestashop:8.0.5-apache | ||
FROM prestashop/prestashop:8.1.3-apache | ||
|
||
RUN cd /usr/local/etc/php/conf.d/ && \ | ||
echo 'memory_limit = 4096M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini | ||
|
||
RUN echo 'max_execution_time = 120' >> /usr/local/etc/php/conf.d/docker-php-maxexectime.ini | ||
|
||
HEALTHCHECK --interval=5m --timeout=3s \ | ||
CMD curl -f http://localhost/ || exit 1 | ||
|
||
|
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,53 @@ | ||
#!/bin/bash | ||
|
||
spinner() { | ||
local pid=$1 | ||
local delay=0.1 | ||
local spinstr='|/-\' | ||
while ps a | awk '{print $1}' | grep -q $pid; do | ||
local temp=${spinstr#?} | ||
printf " [%c] " "$spinstr" | ||
local spinstr=$temp${spinstr%"$temp"} | ||
sleep $delay | ||
printf "\b\b\b\b\b\b" | ||
done | ||
printf " \b\b\b\b" | ||
} | ||
|
||
# Function to display loader with a message | ||
show_loader() { | ||
local message=$1 | ||
local port=$2 | ||
shift 2 | ||
echo -n "$message" | ||
( "$@" ) & | ||
local loader_pid=$! | ||
local success=false | ||
while ps a | awk '{print $1}' | grep -q $loader_pid; do | ||
sleep 0.5 | ||
echo -n "■" | ||
|
||
# Check if Docker container host returns a 302 (replace with your actual check) | ||
http_status=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:$port") | ||
if [ "$http_status" -eq 302 ]; then | ||
success=true | ||
break | ||
fi | ||
done | ||
|
||
if [ "$success" = true ]; then | ||
echo " Done." | ||
else | ||
echo " Failed: Docker container host did not return a 302." | ||
# Optionally, you can add cleanup or error handling code here. | ||
fi | ||
} | ||
|
||
# Usage example with port as a parameter | ||
if [ "$#" -lt 1 ]; then | ||
echo "Usage: $0 <port>" | ||
exit 1 | ||
fi | ||
|
||
port=$1 | ||
show_loader "Building app containers. Please wait " "$port" sleep 120 |
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 |
---|---|---|
|
@@ -16,23 +16,24 @@ jobs: | |
matrix: | ||
include: | ||
- prestashop: 'PS1785' | ||
make: 'make e2eh1785' | ||
make: 'make VERSION=1785 e2eh1785' | ||
subdomain: 'demoshop1785' | ||
port: '8002' | ||
yml: 'docker-compose.1785.yml' | ||
url: 'https://demoshop1785.ngrok.io' | ||
test_spec: '**/cypress/e2e/ps1785/**' | ||
TestRailID: R4954 | ||
- prestashop: 'PS8' | ||
make: 'make e2eh8' | ||
make: 'make VERSION=8 e2eh8' | ||
subdomain: 'demoshop8' | ||
port: '8142' | ||
port: '8002' | ||
yml: 'docker-compose.8.yml' | ||
url: 'https://demoshop8.ngrok.io' | ||
test_spec: '**/cypress/e2e/ps8/**' | ||
TestRailID: R6470 | ||
env: | ||
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }} | ||
DB_PASSWD: ${{ secrets.DB_PASSWD }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
@@ -60,8 +61,18 @@ jobs: | |
- name: Waiting for Ngrok tunnel | ||
run: | | ||
URL="${{ matrix.url }}" | ||
TIMEOUT=120 | ||
start_time=$(date +%s) | ||
while true; do | ||
current_time=$(date +%s) | ||
elapsed_time=$((current_time - start_time)) | ||
if [ "$elapsed_time" -ge "$TIMEOUT" ]; then | ||
echo "Timeout reached. Ngrok tunnel is not ready within $TIMEOUT seconds." | ||
exit 1 | ||
fi | ||
response=$(curl -s -o /dev/null -w "%{http_code}" "$URL") | ||
if [ "$response" = "302" ]; then | ||
echo "URL is returning 302 HTTP status code, Ngrok tunnel is reached, good to go!" | ||
|
@@ -73,6 +84,7 @@ jobs: | |
fi | ||
done | ||
- name: Running ${{ matrix.prestashop }} Cypress E2E tests | ||
run: | | ||
export CYPRESS_baseUrl='${{ matrix.url }}' | ||
|
@@ -82,9 +94,10 @@ jobs: | |
export CYPRESS_TESTRAIL_DOMAIN='${{ secrets.TESTRAIL_DOMAIN }}' | ||
export CYPRESS_TESTRAIL_USERNAME='${{ secrets.TESTRAIL_USERNAME }}' | ||
export CYPRESS_TESTRAIL_PASSWORD='${{ secrets.TESTRAIL_PASSWORD }}' | ||
npx cypress cache prune | ||
npm install -D cypress | ||
npm ci | ||
npx cypress run --spec "${{ matrix.test_spec }}" --browser chrome | ||
npx cypress run --spec "${{ matrix.test_spec }}" | ||
- name: Archive videos and screenshots | ||
if: ${{ always() }} | ||
|
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 |
---|---|---|
|
@@ -11,10 +11,10 @@ jobs: | |
matrix: | ||
include: | ||
- prestashop: 'PS1785' | ||
make: 'make e2eh1785' | ||
make: 'make VERSION=1785 e2eh1785' | ||
port: '8002' | ||
yml: 'docker-compose.1785.yml' | ||
ModuleUpgradeTest: 'make upgrading-module-test-1785' | ||
ModuleUpgradeTest: 'make VERSION=1785 upgrading-module-test-1785' | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
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,15 @@ | ||
# Apache 2.2 | ||
<IfModule !mod_authz_core.c> | ||
Order deny,allow | ||
Deny from all | ||
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ico|webp|woff|woff2|ttf|eot|otf|css|js)$"> | ||
Allow from all | ||
</Files> | ||
</IfModule> | ||
# Apache 2.4 | ||
<IfModule mod_authz_core.c> | ||
Require all denied | ||
<Files ~ "(?i)^.*\.(jpg|jpeg|gif|png|bmp|tiff|svg|pdf|mov|mpeg|mp4|avi|mpg|wma|flv|webm|ico|webp|woff|woff2|ttf|eot|otf|css|js)$"> | ||
Require all granted | ||
</Files> | ||
</IfModule> |
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
Oops, something went wrong.