From c78a1422ffe68b5c7b1a01e9efbc547b350dc1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 07:09:32 +0200 Subject: [PATCH 01/15] TPI-4331: Remove deprecated shop version check --- .github/workflows/build_magento23.yml | 62 --------------------------- 1 file changed, 62 deletions(-) delete mode 100644 .github/workflows/build_magento23.yml diff --git a/.github/workflows/build_magento23.yml b/.github/workflows/build_magento23.yml deleted file mode 100644 index c880c97a..00000000 --- a/.github/workflows/build_magento23.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Build and Test with Magento 2.3 - -on: [push, pull_request, workflow_dispatch] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - max-parallel: 15 - fail-fast: false - matrix: - operating-system: [ubuntu-latest] - php-versions: ['7.3'] - magento-versions: ['2.3'] - - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ROOT_PASSWORD: root - ports: - - 3306:3306 - - steps: - - uses: actions/checkout@v3 - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip - tools: composer:v1.8 - - name: Validate composer.json and composer.lock - run: composer validate - - - name: PHP Syntax Checker - run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) - - - name: Delay for mysql startup - run: sleep 20 - - - name: Delay for mysql startup - run: sleep 20 - - - name: Setup Magento 2 and run tests - run: | - mysql -u root --password=root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS magento;' - git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build - cd /tmp/build - composer update - php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ - --db-host=127.0.0.1 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ - --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ - --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - - composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master - rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* - cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 - php bin/magento setup:upgrade - php bin/magento setup:di:compile - php bin/magento cache:clean - ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit From 607fd068cee4a530d1dd3153017894f3adf1afd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 07:19:12 +0200 Subject: [PATCH 02/15] TPI-4331: Switch to ubuntu 20.04 --- .github/workflows/build.yml | 2 +- .github/workflows/build_magento244php81.yml | 2 +- .github/workflows/build_magento246php82.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf2e0888..b878a165 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - operating-system: [ubuntu-latest] + operating-system: [ubuntu-20.04] php-versions: ['7.4'] magento-versions: ['2.4'] diff --git a/.github/workflows/build_magento244php81.yml b/.github/workflows/build_magento244php81.yml index a8cf7d78..ce84b3b7 100644 --- a/.github/workflows/build_magento244php81.yml +++ b/.github/workflows/build_magento244php81.yml @@ -10,7 +10,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - operating-system: [ubuntu-latest] + operating-system: [ubuntu-20.04] php-versions: ['8.1'] magento-versions: ['2.4.4'] diff --git a/.github/workflows/build_magento246php82.yml b/.github/workflows/build_magento246php82.yml index 85cf6453..3a18b379 100644 --- a/.github/workflows/build_magento246php82.yml +++ b/.github/workflows/build_magento246php82.yml @@ -10,7 +10,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - operating-system: [ubuntu-latest] + operating-system: [ubuntu-20.04] php-versions: ['8.2'] magento-versions: ['2.4.6'] From 72e11d52307da83626bf653374fbf9bf409de24e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 08:20:48 +0200 Subject: [PATCH 03/15] TPI-4331: Fix indention and witch back to latest ubuntu --- .github/workflows/build.yml | 2 +- .github/workflows/build_magento246php82.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b878a165..f899992a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: env: MYSQL_ROOT_PASSWORD: root ports: - - 3306:3306 + - 3306:3306 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/build_magento246php82.yml b/.github/workflows/build_magento246php82.yml index 3a18b379..85cf6453 100644 --- a/.github/workflows/build_magento246php82.yml +++ b/.github/workflows/build_magento246php82.yml @@ -10,7 +10,7 @@ jobs: max-parallel: 15 fail-fast: false matrix: - operating-system: [ubuntu-20.04] + operating-system: [ubuntu-latest] php-versions: ['8.2'] magento-versions: ['2.4.6'] From 918e001f609e76937bca73d4abe316fa3ef1f437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 08:46:33 +0200 Subject: [PATCH 04/15] TPI-4331: Add workflow for mag247 and php83 --- .github/workflows/build_magento247php83.yml | 68 +++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build_magento247php83.yml diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml new file mode 100644 index 00000000..479236c3 --- /dev/null +++ b/.github/workflows/build_magento247php83.yml @@ -0,0 +1,68 @@ +name: Build and Test with PHP 8.2 and Magento 2.6 + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 15 + fail-fast: false + matrix: + operating-system: [ubuntu-latest] + php-versions: ['8.3'] + magento-versions: ['2.4.7-p2'] + + services: + mysql: + image: mysql:latest + env: + MYSQL_ALLOW_EMPTY_PASSWORD: false + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: magento + ports: + - 3306/tcp + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - uses: actions/checkout@v3 + - name: Install PHP + uses: shivammathur/setup-php@master + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip + tools: composer:v2.1 + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Configure sysctl limits + run: | + sudo swapoff -a + sudo sysctl -w vm.swappiness=1 + sudo sysctl -w fs.file-max=262144 + sudo sysctl -w vm.max_map_count=262144 + + - name: PHP Syntax Checker + run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) + + - name: Setup Magento 2 and run tests + run: | + mysql -u root --password=root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS magento;' + git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build + cd /tmp/build + composer update + php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ + --db-host=127.0.0.1 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ + --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ + --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ + --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch + composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master + rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* + cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 + php bin/magento setup:upgrade + php bin/magento setup:di:compile + php bin/magento cache:clean + sed -i 's+>allure/allure.config.php<+>dev/tests/unit/allure/allure.config.php<+g' dev/tests/unit/phpunit.xml.dist + ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit + From c1e0788029169ec29e8cefa74e2c58a68c92d8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 08:54:08 +0200 Subject: [PATCH 05/15] TPI-4331: Database creation via environment variable --- .github/workflows/build_magento247php83.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml index 479236c3..67681b3c 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento247php83.yml @@ -32,7 +32,7 @@ jobs: with: php-version: ${{ matrix.php-versions }} extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip - tools: composer:v2.1 + tools: composer:v2.8 - name: Validate composer.json and composer.lock run: composer validate @@ -48,7 +48,6 @@ jobs: - name: Setup Magento 2 and run tests run: | - mysql -u root --password=root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS magento;' git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build cd /tmp/build composer update From 886cfe3278b53c97a24957417ea34f943b88ecdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 09:52:13 +0200 Subject: [PATCH 06/15] TPI-4331: Switch to other mysql port --- .github/workflows/build_magento247php83.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml index 67681b3c..b7a9fe02 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento247php83.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.2 and Magento 2.6 +name: Build and Test with PHP 8.3 and Magento 2.7-p2 on: [push, pull_request, workflow_dispatch] @@ -22,13 +22,13 @@ jobs: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: magento ports: - - 3306/tcp + - 4444:3306/tcp options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v3 - name: Install PHP - uses: shivammathur/setup-php@master + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip @@ -48,6 +48,7 @@ jobs: - name: Setup Magento 2 and run tests run: | + mysql --user=root --password=root --host=127.0.0.1 --port=4444 -e 'CREATE DATABASE IF NOT EXISTS magento;' git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build cd /tmp/build composer update From 455ec9351d5e3fc6dd6e2b72d733c6d8544a1afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 10:04:42 +0200 Subject: [PATCH 07/15] TPI-4331: Adjust port in magento2 install --- .github/workflows/build_magento247php83.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml index b7a9fe02..b28b18ce 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento247php83.yml @@ -53,7 +53,7 @@ jobs: cd /tmp/build composer update php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ - --db-host=127.0.0.1 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ + --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch From 213214c2be2dbce885bf385b12963959461dfb8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 10:07:53 +0200 Subject: [PATCH 08/15] TPI-4331: Use latest mysql 8 version --- .github/workflows/build_magento247php83.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml index b28b18ce..e186a0a0 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento247php83.yml @@ -16,7 +16,7 @@ jobs: services: mysql: - image: mysql:latest + image: mysql:8 env: MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ROOT_PASSWORD: root From 5fccfb877505cd0a361329281faf4a16c047a8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 10:10:52 +0200 Subject: [PATCH 09/15] TPI-4331: Use latest mysql 8.0.x version --- .github/workflows/build_magento247php83.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml index e186a0a0..9dceb380 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento247php83.yml @@ -16,7 +16,7 @@ jobs: services: mysql: - image: mysql:8 + image: mysql:8.0 env: MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ROOT_PASSWORD: root From d10b6c24420ce63849430d54c147ee8f75c3631f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 11:57:41 +0200 Subject: [PATCH 10/15] TPI-4331: Remove path exchange command --- .github/workflows/build_magento247php83.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento247php83.yml index 9dceb380..5d3f5957 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento247php83.yml @@ -63,6 +63,5 @@ jobs: php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:clean - sed -i 's+>allure/allure.config.php<+>dev/tests/unit/allure/allure.config.php<+g' dev/tests/unit/phpunit.xml.dist ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit From 39f3ab5ba3969e3f2181db0c4aec17f6dc4ba69d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 12:11:05 +0200 Subject: [PATCH 11/15] TPI-4331: Adjust other testings. Range from 2.4.4 to 2.4.7 --- .github/workflows/build.yml | 70 ------------------- ...gento247php83.yml => build_magento244.yml} | 6 +- ...gento246php82.yml => build_magento245.yml} | 22 +++--- .github/workflows/build_magento246.yml | 67 ++++++++++++++++++ ...gento244php81.yml => build_magento247.yml} | 31 ++++---- 5 files changed, 96 insertions(+), 100 deletions(-) delete mode 100644 .github/workflows/build.yml rename .github/workflows/{build_magento247php83.yml => build_magento244.yml} (95%) rename .github/workflows/{build_magento246php82.yml => build_magento245.yml} (75%) create mode 100644 .github/workflows/build_magento246.yml rename .github/workflows/{build_magento244php81.yml => build_magento247.yml} (70%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index f899992a..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Build and Test with Magento 2.4 - -on: [push, pull_request, workflow_dispatch] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - max-parallel: 15 - fail-fast: false - matrix: - operating-system: [ubuntu-20.04] - php-versions: ['7.4'] - magento-versions: ['2.4'] - - services: - mysql: - image: mysql:8.0.20 - env: - MYSQL_ROOT_PASSWORD: root - ports: - - 3306:3306 - - steps: - - uses: actions/checkout@v3 - - name: Install PHP - uses: shivammathur/setup-php@master - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip - tools: composer:v2.1 - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Configure sysctl limits - run: | - sudo swapoff -a - sudo sysctl -w vm.swappiness=1 - sudo sysctl -w fs.file-max=262144 - sudo sysctl -w vm.max_map_count=262144 - - - name: Runs Elasticsearch - uses: elastic/elastic-github-actions/elasticsearch@master - with: - stack-version: 7.6.0 - - - name: PHP Syntax Checker - run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) - - - name: Setup Magento 2 and run tests - run: | - mysql -u root --password=root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS magento;' - git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build - cd /tmp/build - composer update - php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ - --db-host=127.0.0.1 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ - --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ - --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - --search-engine=elasticsearch7 --elasticsearch-host=localhost \ - --elasticsearch-port=9200 - composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master - rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* - cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 - php bin/magento setup:upgrade - php bin/magento setup:di:compile - php bin/magento cache:clean - ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit - diff --git a/.github/workflows/build_magento247php83.yml b/.github/workflows/build_magento244.yml similarity index 95% rename from .github/workflows/build_magento247php83.yml rename to .github/workflows/build_magento244.yml index 5d3f5957..8c9b923e 100644 --- a/.github/workflows/build_magento247php83.yml +++ b/.github/workflows/build_magento244.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.3 and Magento 2.7-p2 +name: Build and Test with PHP 8.1 on Magento 2.4.4-p11 on: [push, pull_request, workflow_dispatch] @@ -11,8 +11,8 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['8.3'] - magento-versions: ['2.4.7-p2'] + php-versions: ['8.1'] + magento-versions: ['2.4.4-p11'] services: mysql: diff --git a/.github/workflows/build_magento246php82.yml b/.github/workflows/build_magento245.yml similarity index 75% rename from .github/workflows/build_magento246php82.yml rename to .github/workflows/build_magento245.yml index 85cf6453..bbb8e4ed 100644 --- a/.github/workflows/build_magento246php82.yml +++ b/.github/workflows/build_magento245.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.2 and Magento 2.6 +name: Build and Test with PHP 8.1 on Magento 2.4.5-p10 on: [push, pull_request, workflow_dispatch] @@ -11,25 +11,28 @@ jobs: fail-fast: false matrix: operating-system: [ubuntu-latest] - php-versions: ['8.2'] - magento-versions: ['2.4.6'] + php-versions: ['8.1'] + magento-versions: ['2.4.5-p10'] services: mysql: - image: mysql:8.0.20 + image: mysql:8.0 env: + MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: magento ports: - - 3306:3306 + - 4444:3306/tcp + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v3 - name: Install PHP - uses: shivammathur/setup-php@master + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip - tools: composer:v2.1 + tools: composer:v2.8 - name: Validate composer.json and composer.lock run: composer validate @@ -45,12 +48,12 @@ jobs: - name: Setup Magento 2 and run tests run: | - mysql -u root --password=root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS magento;' + mysql --user=root --password=root --host=127.0.0.1 --port=4444 -e 'CREATE DATABASE IF NOT EXISTS magento;' git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build cd /tmp/build composer update php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ - --db-host=127.0.0.1 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ + --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch @@ -60,6 +63,5 @@ jobs: php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:clean - sed -i 's+>allure/allure.config.php<+>dev/tests/unit/allure/allure.config.php<+g' dev/tests/unit/phpunit.xml.dist ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit diff --git a/.github/workflows/build_magento246.yml b/.github/workflows/build_magento246.yml new file mode 100644 index 00000000..8d96ae22 --- /dev/null +++ b/.github/workflows/build_magento246.yml @@ -0,0 +1,67 @@ +name: Build and Test with PHP 8.1 and 8.2 on Magento 2.6-p8 + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 15 + fail-fast: false + matrix: + operating-system: [ubuntu-latest] + php-versions: ['8.1', '8.2'] + magento-versions: ['2.4.6-p8'] + + services: + mysql: + image: mysql:8.0 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: false + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: magento + ports: + - 4444:3306/tcp + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - uses: actions/checkout@v3 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip + tools: composer:v2.8 + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Configure sysctl limits + run: | + sudo swapoff -a + sudo sysctl -w vm.swappiness=1 + sudo sysctl -w fs.file-max=262144 + sudo sysctl -w vm.max_map_count=262144 + + - name: PHP Syntax Checker + run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) + + - name: Setup Magento 2 and run tests + run: | + mysql --user=root --password=root --host=127.0.0.1 --port=4444 -e 'CREATE DATABASE IF NOT EXISTS magento;' + git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build + cd /tmp/build + composer update + php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ + --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ + --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ + --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ + --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch + composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master + rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* + cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 + php bin/magento setup:upgrade + php bin/magento setup:di:compile + php bin/magento cache:clean + ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit + diff --git a/.github/workflows/build_magento244php81.yml b/.github/workflows/build_magento247.yml similarity index 70% rename from .github/workflows/build_magento244php81.yml rename to .github/workflows/build_magento247.yml index ce84b3b7..25c5bc81 100644 --- a/.github/workflows/build_magento244php81.yml +++ b/.github/workflows/build_magento247.yml @@ -1,4 +1,4 @@ -name: Build and Test with Magento 2.4 +name: Build and Test with PHP 8.2 and 8.3 on Magento 2.7-p3 on: [push, pull_request, workflow_dispatch] @@ -10,26 +10,29 @@ jobs: max-parallel: 15 fail-fast: false matrix: - operating-system: [ubuntu-20.04] - php-versions: ['8.1'] - magento-versions: ['2.4.4'] + operating-system: [ubuntu-latest] + php-versions: ['8.2','8.3'] + magento-versions: ['2.4.7-p3'] services: mysql: - image: mysql:8.0.20 + image: mysql:8.0 env: + MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: magento ports: - - 3306:3306 + - 4444:3306/tcp + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - uses: actions/checkout@v3 - name: Install PHP - uses: shivammathur/setup-php@master + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} extensions: mbstring, gd, bcmath, ctype, curl, dom, hash, iconv, intl, openssl, simplexml, soap, xsl, zip - tools: composer:v2.1 + tools: composer:v2.8 - name: Validate composer.json and composer.lock run: composer validate @@ -40,26 +43,20 @@ jobs: sudo sysctl -w fs.file-max=262144 sudo sysctl -w vm.max_map_count=262144 - - name: Runs Elasticsearch - uses: elastic/elastic-github-actions/elasticsearch@master - with: - stack-version: 7.6.0 - - name: PHP Syntax Checker run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) - name: Setup Magento 2 and run tests run: | - mysql -u root --password=root -h 127.0.0.1 -e 'CREATE DATABASE IF NOT EXISTS magento;' + mysql --user=root --password=root --host=127.0.0.1 --port=4444 -e 'CREATE DATABASE IF NOT EXISTS magento;' git clone --depth=1 -b ${{ matrix.magento-versions }} https://github.com/magento/magento2 /tmp/build cd /tmp/build composer update php bin/magento setup:install --base-url=http://magebuild.integrations.p1-test.de/build/ \ - --db-host=127.0.0.1 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ + --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - --search-engine=elasticsearch7 --elasticsearch-host=localhost \ - --elasticsearch-port=9200 + --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 From e0589a3fc290d8f97150796e30447f31018e1171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 12:14:40 +0200 Subject: [PATCH 12/15] TPI-4331: Fix typos --- .github/workflows/build_magento246.yml | 2 +- .github/workflows/build_magento247.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_magento246.yml b/.github/workflows/build_magento246.yml index 8d96ae22..315b21b9 100644 --- a/.github/workflows/build_magento246.yml +++ b/.github/workflows/build_magento246.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.1 and 8.2 on Magento 2.6-p8 +name: Build and Test with PHP 8.1 and 8.2 on Magento 2.4.6-p8 on: [push, pull_request, workflow_dispatch] diff --git a/.github/workflows/build_magento247.yml b/.github/workflows/build_magento247.yml index 25c5bc81..fcfa1089 100644 --- a/.github/workflows/build_magento247.yml +++ b/.github/workflows/build_magento247.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.2 and 8.3 on Magento 2.7-p3 +name: Build and Test with PHP 8.2 and 8.3 on Magento 2.4.7-p3 on: [push, pull_request, workflow_dispatch] From 1dfc14064caab61f9f011b990779dae09a3c992f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 12:21:47 +0200 Subject: [PATCH 13/15] TPI-4331: Compatibility adjustments --- .github/workflows/build_magento244.yml | 2 +- .github/workflows/build_magento245.yml | 2 +- .github/workflows/build_magento246.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_magento244.yml b/.github/workflows/build_magento244.yml index 8c9b923e..06a15d83 100644 --- a/.github/workflows/build_magento244.yml +++ b/.github/workflows/build_magento244.yml @@ -56,7 +56,7 @@ jobs: --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch + --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 diff --git a/.github/workflows/build_magento245.yml b/.github/workflows/build_magento245.yml index bbb8e4ed..6298e6a8 100644 --- a/.github/workflows/build_magento245.yml +++ b/.github/workflows/build_magento245.yml @@ -56,7 +56,7 @@ jobs: --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch,Magento_OpenSearch + --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 diff --git a/.github/workflows/build_magento246.yml b/.github/workflows/build_magento246.yml index 315b21b9..61dd3555 100644 --- a/.github/workflows/build_magento246.yml +++ b/.github/workflows/build_magento246.yml @@ -63,5 +63,6 @@ jobs: php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento cache:clean + sed -i 's+>allure/allure.config.php<+>dev/tests/unit/allure/allure.config.php<+g' dev/tests/unit/phpunit.xml.dist ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit From d33c457675a8b3f1aac49de8688cd66641321dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 12:40:38 +0200 Subject: [PATCH 14/15] TPI-4331: Add elasticsearch for 2.4.4 and 2.4.5 --- .github/workflows/build_magento244.yml | 9 +++++++-- .github/workflows/build_magento245.yml | 8 +++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_magento244.yml b/.github/workflows/build_magento244.yml index 06a15d83..189171f0 100644 --- a/.github/workflows/build_magento244.yml +++ b/.github/workflows/build_magento244.yml @@ -43,6 +43,11 @@ jobs: sudo sysctl -w fs.file-max=262144 sudo sysctl -w vm.max_map_count=262144 + - name: Runs Elasticsearch + uses: elastic/elastic-github-actions/elasticsearch@master + with: + stack-version: 7.6.0 + - name: PHP Syntax Checker run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) @@ -56,7 +61,8 @@ jobs: --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch + --search-engine=elasticsearch7 --elasticsearch-host=localhost \ + --elasticsearch-port=9200 composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 @@ -64,4 +70,3 @@ jobs: php bin/magento setup:di:compile php bin/magento cache:clean ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/payone-gmbh/magento-2/Test/Unit - diff --git a/.github/workflows/build_magento245.yml b/.github/workflows/build_magento245.yml index 6298e6a8..ec1bb32b 100644 --- a/.github/workflows/build_magento245.yml +++ b/.github/workflows/build_magento245.yml @@ -43,6 +43,11 @@ jobs: sudo sysctl -w fs.file-max=262144 sudo sysctl -w vm.max_map_count=262144 + - name: Runs Elasticsearch + uses: elastic/elastic-github-actions/elasticsearch@master + with: + stack-version: 7.6.0 + - name: PHP Syntax Checker run: find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) @@ -56,7 +61,8 @@ jobs: --db-host=127.0.0.1:4444 --db-name=magento --db-user=root --db-password=root --admin-firstname=Dieter \ --admin-lastname=Demo --admin-email=dieterdemo@payone.com --admin-user=DieterDemo \ --admin-password=72q980hdfq2378ga9w87dg6 --language=de_DE --currency=EUR --timezone=Europe/Berlin \ - --disable-modules=Magento_Elasticsearch7,Magento_Elasticsearch + --search-engine=elasticsearch7 --elasticsearch-host=localhost \ + --elasticsearch-port=9200 composer require --ignore-platform-reqs payone-gmbh/magento-2 dev-master rm -rf /tmp/build/vendor/payone-gmbh/magento-2/* cp -R $GITHUB_WORKSPACE/* /tmp/build/vendor/payone-gmbh/magento-2 From bcff5a21709fe87cf54fa6ec30a5fed39729a682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gregor-Herrmann?= Date: Wed, 9 Oct 2024 13:30:01 +0200 Subject: [PATCH 15/15] TPI-4331: Proper readability --- .github/workflows/{build_magento244.yml => magento244.yml} | 2 +- .github/workflows/{build_magento245.yml => magento245.yml} | 2 +- .github/workflows/{build_magento246.yml => magento246.yml} | 2 +- .github/workflows/{build_magento247.yml => magento247.yml} | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{build_magento244.yml => magento244.yml} (98%) rename .github/workflows/{build_magento245.yml => magento245.yml} (98%) rename .github/workflows/{build_magento246.yml => magento246.yml} (97%) rename .github/workflows/{build_magento247.yml => magento247.yml} (97%) diff --git a/.github/workflows/build_magento244.yml b/.github/workflows/magento244.yml similarity index 98% rename from .github/workflows/build_magento244.yml rename to .github/workflows/magento244.yml index 189171f0..3247659f 100644 --- a/.github/workflows/build_magento244.yml +++ b/.github/workflows/magento244.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.1 on Magento 2.4.4-p11 +name: Magento 2.4.4-p11 with PHP 8.1 on: [push, pull_request, workflow_dispatch] diff --git a/.github/workflows/build_magento245.yml b/.github/workflows/magento245.yml similarity index 98% rename from .github/workflows/build_magento245.yml rename to .github/workflows/magento245.yml index ec1bb32b..bf04c31c 100644 --- a/.github/workflows/build_magento245.yml +++ b/.github/workflows/magento245.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.1 on Magento 2.4.5-p10 +name: Magento 2.4.5-p10 with PHP 8.1 on: [push, pull_request, workflow_dispatch] diff --git a/.github/workflows/build_magento246.yml b/.github/workflows/magento246.yml similarity index 97% rename from .github/workflows/build_magento246.yml rename to .github/workflows/magento246.yml index 61dd3555..750fc907 100644 --- a/.github/workflows/build_magento246.yml +++ b/.github/workflows/magento246.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.1 and 8.2 on Magento 2.4.6-p8 +name: Magento 2.4.6-p8 with PHP 8.1 and 8.2 on: [push, pull_request, workflow_dispatch] diff --git a/.github/workflows/build_magento247.yml b/.github/workflows/magento247.yml similarity index 97% rename from .github/workflows/build_magento247.yml rename to .github/workflows/magento247.yml index fcfa1089..9fbf6319 100644 --- a/.github/workflows/build_magento247.yml +++ b/.github/workflows/magento247.yml @@ -1,4 +1,4 @@ -name: Build and Test with PHP 8.2 and 8.3 on Magento 2.4.7-p3 +name: Magento 2.4.7-p3 with PHP 8.2 and 8.3 on: [push, pull_request, workflow_dispatch]