Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECP-9328] E2E Test Pipeline Setup #48

Merged
merged 178 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
bc2c874
[ECP-9328] Docker files for creating installing magento with Hyva dep…
Aug 19, 2024
dc6b78c
[ECP-9328] Customized Magento e2e files based on Hyva local files
Aug 20, 2024
46504e9
[ECP-9328] Update workflow name
Aug 20, 2024
7da9d7e
[ECP-9328] Add Makefile
Aug 20, 2024
e80c6d1
[ECP-9328] Add key part for hyva
Aug 21, 2024
be16d8b
[ECP-9328] Fix docker file locations
Aug 21, 2024
5110e22
[ECP-9328] Make key environment variable
Aug 21, 2024
a6ce3f4
[ECP-9328] Fix syntax
Aug 21, 2024
2e4eb21
[ECP-9328] Add a push trigger
Aug 21, 2024
6992b5c
[ECP-9328] Update context directory
Aug 21, 2024
5c51537
[ECP-9328] Try the trigger again
Aug 21, 2024
ffed7e6
[ECP-9328] Try the trigger again
Aug 21, 2024
29a0933
[ECP-9328] Update docker file
Aug 21, 2024
c11cd7a
[ECP-9328] Add php config
Aug 21, 2024
4a52d16
[ECP-9328] Update config location
Aug 21, 2024
ddd3809
[ECP-9328] Enable hyva dependency installation
Aug 21, 2024
c2b4eb2
[ECP-9328] Disable volumn binding for key and try environment variabl…
Aug 22, 2024
83186a8
[ECP-9328] Add open-ssh client so that we can use ssh-keyscan
Aug 22, 2024
d54641b
[ECP-9328] try different client
Aug 22, 2024
d2b65b2
[ECP-9328] Check key inside container
Aug 22, 2024
34c4289
[ECP-9328] Update dockerfile for key
Aug 22, 2024
8596724
[ECP-9328] Add volum binding for key back
Aug 22, 2024
fb0f70b
[ECP-9328] Remove keycheck
Aug 22, 2024
e424de8
[ECP-9328] update root
Aug 22, 2024
d102703
[ECP-9328] update root
Aug 22, 2024
7cb62c8
[ECP-9328] try to only install hyva to test ssh key
Aug 22, 2024
7aeee5c
[ECP-9328] try to only install hyva to test ssh key 2
Aug 22, 2024
7d5c0b6
[ECP-9328] move install_hyva from entrypoint to workflow in order to …
Aug 22, 2024
b7db962
[ECP-9328] Added composer.
Aug 22, 2024
ccf540d
[ECP-9328] Update docker.
Aug 22, 2024
45be8de
[ECP-9328] Update docker.
Aug 22, 2024
96746b3
[ECP-9328] More steps in the dockerfile because things crash.
Aug 22, 2024
a2b424f
[ECP-9328] Back to the original file but hyva separated.
Aug 22, 2024
f28527a
[ECP-9328] Separate the build step so the output is clean.
Aug 22, 2024
b6b1ace
[ECP-9328] copy install_hyva
Aug 22, 2024
25f935d
[ECP-9328] permissions and try to validate ssh
Aug 22, 2024
f280a3e
[ECP-9328] check contents of the .ssh folder.
Aug 22, 2024
05944fc
[ECP-9328] Added some more debug steps.
Aug 22, 2024
3e2f350
[ECP-9328] Trigger installation manually.
Aug 22, 2024
4821fa4
[ECP-9328] Magento got stuck
Aug 22, 2024
635c9f8
[ECP-9328] Attempt to write the config from the Dockerfile since the …
Aug 22, 2024
3901f7b
[ECP-9328] Forgot the multi-line
Aug 22, 2024
d414552
[ECP-9328] Removed the &&
Aug 22, 2024
cb983a5
[ECP-9328] Added git to the container for hyva.
Aug 22, 2024
e577190
[ECP-9328] Check again
Aug 22, 2024
434633e
[ECP-9328] Sample data
Aug 22, 2024
14fce8e
[ECP-9328] Sample data
Aug 22, 2024
e45001e
[ECP-9328] Try a different way of installing magento
Aug 23, 2024
670a709
[ECP-9328] Add config debug code again
Aug 23, 2024
44d3bb2
[ECP-9328] try again
Aug 23, 2024
31fd86c
[ECP-9328]syntax fix
Aug 23, 2024
9832f3d
[ECP-9328]syntax fix
Aug 23, 2024
568a34c
[ECP-9328] Replace all files
Aug 23, 2024
6f9c0dd
[ECP-9328] Update fields
Aug 23, 2024
d3a421d
[ECP-9328] Update db
Aug 23, 2024
d154f3b
[ECP-9328] Update nginx image
Aug 23, 2024
53f4f38
[ECP-9328] Update nginx image
Aug 23, 2024
5b33fb9
[ECP-9328] Update fields
Aug 23, 2024
cfdeae6
[ECP-9328] Update fields
Aug 23, 2024
ade9a2d
[ECP-9328] Update db
Aug 23, 2024
1c25b5a
[ECP-9328] Syntax
Aug 23, 2024
e7a254b
[ECP-9328] permissions
Aug 23, 2024
2505ad5
[ECP-9328] add packages back
Aug 23, 2024
fe8b703
[ECP-9328] add packages back
Aug 23, 2024
9235eb5
[ECP-9328]put back old files
Aug 23, 2024
7e03bcb
[ECP-9328] remove reset theme
Aug 23, 2024
9ba5748
[ECP-9328] add reset theme back
Aug 23, 2024
bf648e1
[ECP-9328] add composer cache directory explicitly
Aug 23, 2024
2a177f7
[ECP-9328] try dn a different step
Aug 23, 2024
290b4bf
[ECP-9328] try to move composer cache to somewhere else
Aug 23, 2024
6db27ae
[ECP-9328] try different module name
Aug 23, 2024
4ff5ea4
[ECP-9328] manually create vcs directory
Aug 23, 2024
4aa9474
[ECP-9328] List contents of composer cache directory
Aug 26, 2024
33aebf1
[ECP-9328] Syntax
Aug 26, 2024
26f0efd
[ECP-9328] Syntax
Aug 26, 2024
7410b08
[ECP-9328] Syntax correction for missing operand error
Aug 26, 2024
0ef359e
[ECP-9328] Syntax correction for missing operand error
Aug 26, 2024
efe25b7
[ECP-9328] Syntax correction for missing operand error
Aug 26, 2024
336b96a
[ECP-9328] Put back the syntax that is working
Aug 26, 2024
0e05425
[ECP-9328] Remove duplicate ssh code
Aug 26, 2024
d44136e
[ECP-9328] Add debug steps
Aug 26, 2024
2918c32
[ECP-9328] Add volume binding to the ssh folder in container
Aug 26, 2024
e6edb6d
[ECP-9328] Remove "rm" from container
Aug 26, 2024
b36e611
[ECP-9328] Remove debug files
Aug 26, 2024
0513f51
[ECP-9328] Set SSH key in the Docker container
Sep 8, 2024
97336ff
[ECP-9328] Move Hyva installation to make file
Sep 11, 2024
7afb63c
[ECP-9328] Move ssh config to e2e yml
Sep 11, 2024
1085a3b
[ECP-9328] check the contents of the current directory in the make file
Sep 11, 2024
f15fa32
[ECP-9328] put hyva installation after composer cache is created
Sep 11, 2024
fd74125
[ECP-9328] put hyva installation with no-cache
Sep 11, 2024
aa45368
[ECP-9328] Fix comment syntax
Sep 11, 2024
2efe98c
[ECP-9328] check contents of container directory, try again putting t…
Sep 11, 2024
b216085
[ECP-9328] see if the arg key variable is available in the make file
Sep 11, 2024
fdde23c
[ECP-9328] move hyva intallation to separate script
Sep 11, 2024
5b5b234
[ECP-9328] combine magento and hyva install commands
Sep 11, 2024
0ebdd2b
[ECP-9328] try develop branch
Sep 11, 2024
90cbce7
[ECP-9328] make SSH_PRIVATE_KEY environment variable
Sep 11, 2024
03f9f7b
[ECP-9328] try removing old static content and enable the module
Sep 11, 2024
e5542f9
[ECP-9328] setup upgrade and remove static content deploy
Sep 11, 2024
f4b2cc8
[ECP-9328] remove container after installing everything
Sep 11, 2024
5919b12
[ECP-9328] Move key to www-data user
Sep 11, 2024
e06791c
[ECP-9328] Typo
Sep 11, 2024
7701ae6
[ECP-9328] Change permission
Sep 11, 2024
5fe2489
[ECP-9328] Create missing directory
Sep 11, 2024
d8273d0
[ECP-9328] give permissions to www user in docker file
Sep 16, 2024
994766e
[ECP-9328] Check permissions of the home folder
Sep 16, 2024
4abcf84
[ECP-9328] Transfer ownership of var/www to www-data
Sep 16, 2024
6a396b9
[ECP-9328] Reverted the ownership transfer and limited it to only the…
Sep 16, 2024
86ae526
[ECP-9328] Removed this step since it's no longer required.
Sep 16, 2024
fc3c356
[ECP-9328] Add execute permissions to the e2e.sh script
Sep 16, 2024
fb5cd67
Merge branch 'develop' into ECP-9328
SushmitaThakur Sep 17, 2024
42e43d8
[ECP-9328] Added command to run hyva tests, synchronized with ITT hyv…
Sep 17, 2024
08e3931
Merge remote-tracking branch 'origin/ECP-9328' into ECP-9328
Sep 17, 2024
a4c4b78
[ECP-9328] Small cleanup
Sep 17, 2024
44f8a55
[ECP-9328] remove redundant permission step and list contents of scri…
Sep 17, 2024
ff6dcaf
[ECP-9328] remove redundant permission step and list contents of scri…
Sep 17, 2024
138e4b1
[ECP-9328] update triggers
Sep 17, 2024
6fdf539
[ECP-9328] Fix syntax
Sep 17, 2024
abdaf8d
[ECP-9328] Add debug code
Sep 17, 2024
cf120f5
[ECP-9328] Make debug code inline
Sep 17, 2024
2d32c89
[ECP-9328] Add execution back
Sep 17, 2024
b9d18ba
[ECP-9328] Try volume binding the script folder instead of the script…
Sep 17, 2024
5d7d11d
[ECP-9328] Remove sh to run command with bash
Sep 17, 2024
a44e15e
[ECP-9328] remove old volume binding code, install hyva from current …
Sep 17, 2024
94fb044
[ECP-9328] Try to volume bind the current repository as /data/extensi…
Sep 17, 2024
6149e09
[ECP-9328] Set the branch name in an env variable.
Sep 17, 2024
62785d4
[ECP-9328] Test the branch name variable.
Sep 17, 2024
5835315
[ECP-9328] Attempt to install hyva with the branch selector.
Sep 17, 2024
cf07c3d
[ECP-9328] Test if install hyva file has correct file.
Sep 17, 2024
6fd89c5
[ECP-9328] Put tests back
Sep 17, 2024
706e0a7
[ECP-9328] Put nginx back
Sep 18, 2024
b3f6191
[ECP-9328] List running docker containers
Sep 18, 2024
472d3e6
[ECP-9328] Remove paypal for now since we don't have playwright paypa…
Sep 18, 2024
744bd72
[ECP-9328] update artifact action version
Sep 18, 2024
6845222
[ECP-9328] update test branch to hyva develop
Sep 23, 2024
fa88c28
[ECP-9328] update test branch to ECP-9478, enable paypal
Sep 30, 2024
373a479
[ECP-9328] update checkout version and add step to show enabled hyva …
Sep 30, 2024
1ad91e2
[ECP-9328] update show theme command
Sep 30, 2024
d230212
[ECP-9328] update show theme command
Sep 30, 2024
aca8f82
[ECP-9328] remove quotes from show theme command
Sep 30, 2024
ccfdb5d
[ECP-9328] remove grep from show theme command
Sep 30, 2024
fa9c8a7
[ECP-9328]try to enable hyva theme
Sep 30, 2024
eb93bda
[ECP-9328] try to check all the installed themes in the database for …
Sep 30, 2024
670e35a
[ECP-9328] remove comment
Sep 30, 2024
5717199
[ECP-9328] add new code for enabling hyva
Sep 30, 2024
1b1b94e
[ECP-9328] test theme code
Sep 30, 2024
95df934
[ECP-9328] test access to mariadb
Oct 1, 2024
3eddd22
[ECP-9328] remove theme query
Oct 1, 2024
4a35b38
[ECP-9328] show tables
Oct 1, 2024
08c157c
[ECP-9328] add prefix on the table names, move the config:set paramet…
Oct 1, 2024
82ed6e8
[ECP-9328] remove show tables
Oct 1, 2024
2e84a8f
[ECP-9328] try to set the theme again
Oct 1, 2024
8c96bbf
[ECP-9328] remove general theme command
Oct 1, 2024
5a9377f
[ECP-9328]show config table
Oct 1, 2024
bb6252b
[ECP-9328] remove theme set on makefile
Oct 1, 2024
d3ee92e
[ECP-9328] Set the theme id through DB query
Oct 1, 2024
43912eb
[ECP-9328] Make refresh commnand
Oct 1, 2024
08c018e
[ECP-9328] Check HYVA module status
Oct 1, 2024
6df600b
[ECP-9328] fixed syntax
Oct 1, 2024
8282f11
[ECP-9328] List installed modules
Oct 1, 2024
e4e0e84
[ECP-9328] Add hyva checkout in config table
Oct 1, 2024
bfb9aaf
[ECP-9328] Optimize the commands
Oct 1, 2024
ec6a8de
[ECP-9328] Fix syntax
Oct 1, 2024
db8f326
[ECP-9328] Fix syntax
Oct 1, 2024
610ce38
[ECP-9328] Add config from workflow since db instance can't access ma…
Oct 1, 2024
d0a76c9
[ECP-9328] Put hyva steps together and cache flush
Oct 1, 2024
08bc494
[ECP-9328] Add Refresh
Oct 1, 2024
4bcf94f
[ECP-9328] Remove graphQL code
Oct 1, 2024
c1174ca
[ECP-9328] Enable Card holder name for CC
Oct 2, 2024
b4ffe5d
[ECP-9328] Remove delete command from refresh
Oct 2, 2024
f608c09
[ECP-9328] Add line to trigger new workflow run
Oct 2, 2024
3021708
[ECP-9328] Remove line to trigger new workflow run
Oct 2, 2024
13fc991
[ECP-9328] Add more lines in refresh
Oct 2, 2024
43eb96b
[ECP-9328] check
Oct 2, 2024
a13a5fa
[ECP-9328] check
Oct 2, 2024
1a1658c
[ECP-9328] remove check
Oct 2, 2024
d942b11
Merge branch 'develop' into ECP-9328
khushboo-singhvi Oct 3, 2024
0db70e0
Merge branch 'develop' into ECP-9328
SushmitaThakur Oct 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
ARG PHP_VERSION
FROM php:${PHP_VERSION}-apache
LABEL maintainer="Adyen <[email protected]>"

ENV MAGENTO_HOST="<will be defined>" \
DB_SERVER="<will be defined>" \
DB_PORT=3306 \
DB_NAME=magento \
DB_USER=magento \
DB_PASSWORD=magento \
DB_PREFIX=m2_ \
ELASTICSEARCH_SERVER="<will be defined>" \
ELASTICSEARCH_PORT=9200 \
ELASTICSEARCH_INDEX_PREFIX=magento2 \
ELASTICSEARCH_TIMEOUT=15 \
ADMIN_NAME=admin \
ADMIN_LASTNAME=admin \
[email protected] \
ADMIN_USERNAME=admin \
ADMIN_PASSWORD=admin123 \
ADMIN_URLEXT=admin \
MAGENTO_LANGUAGE=en_US \
MAGENTO_CURRENCY=EUR \
MAGENTO_TZ=Europe/Amsterdam \
DEPLOY_SAMPLEDATA=0 \
USE_SSL=1 \
SSH_PRIVATE_KEY=${SSH_PRIVATE_KEY}

RUN apt-get update \
&& apt-get install -y libjpeg62-turbo-dev \
libpng-dev \
libfreetype6-dev \
libxml2-dev \
libzip-dev \
libssl-dev \
libxslt-dev \
default-mysql-client \
ssl-cert \
wget \
cron \
unzip \
ssh \
git

RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install -j$(nproc) bcmath gd intl pdo_mysql simplexml soap sockets xsl zip
RUN a2enmod ssl
RUN a2ensite default-ssl.conf #can be removed if not needed
WORKDIR /var/www/html
COPY config/php.ini /usr/local/etc/php/
COPY scripts/install_magento.sh /tmp/install_magento.sh
COPY scripts/install_hyva.sh /tmp/install_hyva.sh

RUN if [ -x "$(command -v apache2-foreground)" ]; then a2enmod rewrite; fi

ARG MAGENTO_VERSION
ADD "https://github.com/magento/magento2/archive/refs/tags/${MAGENTO_VERSION}.tar.gz" /tmp/magento.tar.gz
ADD "https://github.com/magento/magento2-sample-data/archive/refs/tags/${MAGENTO_VERSION}.tar.gz" /tmp/sample-data.tar.gz

RUN chmod +x /tmp/install_magento.sh
RUN chmod +x /tmp/install_hyva.sh

# Create the directory here because www-data won't have permissions to make it themselves.
RUN mkdir -p /var/www/.ssh
RUN chown -R www-data:www-data /var/www/.ssh

CMD ["bash", "/tmp/install_magento.sh"]
83 changes: 83 additions & 0 deletions .github/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Install N98-Magerun
n98-magerun2.phar:
wget -q https://files.magerun.net/n98-magerun2.phar
chmod +x ./n98-magerun2.phar

# Check Magento installation
sys-check: n98-magerun2.phar
./n98-magerun2.phar sys:check

# Install Magento (without starting Apache)
magento:
sed '/exec /d' /tmp/install_magento.sh | bash

hyva: install-hyva configure flush

# Hyva install
install-hyva:
sed '/exec /d' /tmp/install_hyva.sh | bash

# Install developer module
dev-module:
bin/magento module:enable Adyen_Developer
bin/magento setup:upgrade

# Configuration
configure: n98-magerun2.phar
echo "configuration step started"
bin/magento config:set payment/adyen_abstract/demo_mode 1
bin/magento adyen:enablepaymentmethods:run
bin/magento config:set payment/adyen_abstract/has_holder_name 1
bin/magento config:set payment/adyen_pay_by_link/active 1
bin/magento config:set payment/adyen_pay_by_link/days_to_expire 5
bin/magento config:set payment/adyen_giving/active 1
bin/magento config:set payment/adyen_giving/charity_description 'test'
bin/magento config:set payment/adyen_giving/charity_website 'https://adyen.com'
bin/magento config:set payment/adyen_giving/charity_merchant_account "${DONATION_ACCOUNT}"
bin/magento config:set payment/adyen_giving/donation_amounts '1,5,10'
bin/magento config:set payment/adyen_giving/background_image ''
bin/magento config:set payment/adyen_abstract/merchant_account "${ADYEN_MERCHANT}"
bin/magento config:set payment/adyen_abstract/notifications_ip_check 0
bin/magento config:set payment/adyen_abstract/payment_authorized 'processing'
bin/magento config:set payment/adyen_abstract/payment_pre_authorized 'pending_payment'
bin/magento config:set payment/adyen_abstract/capture_mode 'manual'
bin/magento config:set payment/adyen_abstract/paypal_capture_mode 0
bin/magento config:set payment/adyen_abstract/recurring_configuration '{"adyen_cc":{"name":"Credit Card","enabled":"1","recurringProcessingModel":"CardOnFile"}}'
bin/magento config:set payment/adyen_cc_vault/require_cvc 1
bin/magento config:set payment/adyen_abstract/client_key_test "${ADYEN_CLIENT_KEY}"
bin/magento config:set payment/adyen_abstract/notification_username 'admin'
bin/magento config:set payment/adyen_abstract/payment_methods_active 1
bin/magento config:set payment/adyen_abstract/has_holder_name 1
./n98-magerun2.phar config:store:set --encrypt payment/adyen_abstract/notification_password '1234' > /dev/null
./n98-magerun2.phar config:store:set --encrypt payment/adyen_abstract/api_key_test "${ADYEN_API_KEY}" > /dev/null
echo "configuration step ended"

# Clear cache
flush:
bin/magento cache:flush

# Setup permissions
fs:
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chmod 777 -R var
chown -R www-data:www-data .
chmod u+x bin/magento
echo "memory_limit = -1" > /usr/local/etc/php/conf.d/memory.ini

# Production mode
production:
bin/magento deploy:mode:set production

refresh:
rm -rf generated/metadata
rm -rf generated/code
rm -rf pub/static/adminhtml/*
rm -rf pub/static/frontend/*

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

MAGENTO_ROOT=/var/www/html
8 changes: 8 additions & 0 deletions .github/config/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
memory_limit = 2G
; Error reporting in production mode
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = Off
display_startup_errors = On
post_max_size = 20M
upload_max_filesize = 20M
date.timezone = Europe/Amsterdam
29 changes: 29 additions & 0 deletions .github/docker-compose.e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: '3'
services:
playwright:
image: mcr.microsoft.com/playwright:v1.40.1
shm_size: 1gb
ipc: host
cap_add:
- SYS_ADMIN
networks:
- backend
environment:
- INTEGRATION_TESTS_BRANCH
- MAGENTO_BASE_URL
- MAGENTO_ADMIN_USERNAME
- MAGENTO_ADMIN_PASSWORD
- PAYPAL_USERNAME
- PAYPAL_PASSWORD
- ADYEN_API_KEY
- ADYEN_CLIENT_KEY
- ADYEN_MERCHANT
- GOOGLE_USERNAME
- GOOGLE_PASSWORD
- WEBHOOK_USERNAME
- WEBHOOK_PASSWORD
volumes:
- ./scripts:/scripts
- ../test-report:/tmp/test-report
networks:
backend:
67 changes: 67 additions & 0 deletions .github/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
version: '3'

services:
web:
build:
context: .
args:
- PHP_VERSION=${PHP_VERSION}
- MAGENTO_VERSION=${MAGENTO_VERSION}
container_name: magento2-hyva-container
networks:
backend:
aliases:
- magento2.test.com
extra_hosts:
- "magento2.test.com:127.0.0.1"
environment:
DB_SERVER: mariadb
ELASTICSEARCH_SERVER: elasticsearch
MAGENTO_HOST: magento2.test.com
VIRTUAL_HOST: magento2.test.com
COMPOSER_MEMORY_LIMIT: -1
DONATION_ACCOUNT:
ADMIN_USERNAME: "admin"
ADMIN_PASSWORD: "Adyen123@"
ADYEN_MERCHANT:
ADYEN_API_KEY:
ADYEN_CLIENT_KEY:
PHP_VERSION:
MAGENTO_VERSION:
DEPLOY_SAMPLEDATA: 1
SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY}
BRANCH_NAME: ${BRANCH_NAME}
depends_on:
- db
- elastic
volumes:
- ../:/data/extensions/workdir
- ./Makefile:/var/www/html/Makefile
- composer:/usr/local/bin
- magento:/var/www/html
db:
image: mariadb:10.4
container_name: mariadb
networks:
- backend
environment:
MARIADB_ROOT_PASSWORD: root_password
MARIADB_DATABASE: magento
MARIADB_USER: magento
MARIADB_PASSWORD: magento
elastic:
image: elasticsearch:7.17.13
container_name: elasticsearch
networks:
- backend
ports:
- 9200:9200
- 9300:9300
environment:
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xms750m -Xmx750m"
networks:
backend:
volumes:
magento:
composer:
14 changes: 14 additions & 0 deletions .github/scripts/e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# Base configuration and installation
set -euo pipefail
cd /tmp
git clone https://github.com/Adyen/adyen-integration-tools-tests.git
cd adyen-integration-tools-tests
git checkout "$INTEGRATION_TESTS_BRANCH"
rm -rf package-lock.json
npm i
npx playwright install

echo "Running HYVA E2E Tests."
npm run test:ci:hyva
28 changes: 28 additions & 0 deletions .github/scripts/install_hyva.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Set up SSH config for gitlab.hyva.io
echo "${SSH_PRIVATE_KEY}" >> ~/.ssh/hyva_id_rsa
chmod 600 ~/.ssh/hyva_id_rsa
ssh-keyscan gitlab.hyva.io >> ~/.ssh/known_hosts
echo "Host gitlab.hyva.io" >> ~/.ssh/config
echo " StrictHostKeyChecking no" >> ~/.ssh/config
echo " IdentityFile /var/www/.ssh/hyva_id_rsa" >> ~/.ssh/config
chmod 600 ~/.ssh/config

# Configure composer
echo "Configuring Composer with additional repositories"
composer config repositories.hyva-themes/hyva-checkout git [email protected]:hyva-checkout/checkout.git
composer config repositories.hyva-themes/magento2-theme-module git [email protected]:hyva-themes/magento2-theme-module.git
composer config repositories.hyva-themes/magento2-reset-theme git [email protected]:hyva-themes/magento2-reset-theme.git
composer config repositories.hyva-themes/magento2-email-theme git [email protected]:hyva-themes/magento2-email-module.git
composer config repositories.hyva-default-theme git [email protected]:hyva-themes/magento2-default-theme.git

# Install Hyva compatibility module
echo "Installing Hyva compatibility module"
# TODO: update the branch from develop to current branch
echo "dev-${BRANCH_NAME}"
composer require adyen/module-hyva-checkout:dev-${BRANCH_NAME}
bin/magento module:enable --all

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
Loading
Loading