From d7d6fad307ecab52afebecd9df5811159c71b540 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 5 Feb 2024 12:36:58 +0100 Subject: [PATCH 01/11] Add github actions, DEV-367 --- .github/workflows/coding-standard.yml | 10 ++++++++++ .github/workflows/mess-detector.yml | 10 ++++++++++ .github/workflows/phpstan.yml | 12 ++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 .github/workflows/coding-standard.yml create mode 100644 .github/workflows/mess-detector.yml create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/coding-standard.yml b/.github/workflows/coding-standard.yml new file mode 100644 index 0000000..fa358ed --- /dev/null +++ b/.github/workflows/coding-standard.yml @@ -0,0 +1,10 @@ +name: ExtDN M2 Coding Standard +on: [push, pull_request] + +jobs: + static: + name: M2 Coding Standard + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-coding-standard@master diff --git a/.github/workflows/mess-detector.yml b/.github/workflows/mess-detector.yml new file mode 100644 index 0000000..23e9417 --- /dev/null +++ b/.github/workflows/mess-detector.yml @@ -0,0 +1,10 @@ +name: ExtDN M2 Mess Detector +on: [push, pull_request] + +jobs: + phpmd: + name: M2 Mess Detector + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-mess-detector@master diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..f15bbe9 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,12 @@ +name: ExtDN M2 PHPStan +on: [push, pull_request] + +jobs: + phpstan: + name: M2 PHPStan + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-phpstan@master + with: + composer_name: customgento/module-mass-update-tier-prices-m2 From 2cae55c80a886bb54071ed4eaf9cb2614ba8faae Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 5 Feb 2024 12:48:38 +0100 Subject: [PATCH 02/11] Fix GitHub actions, DEV-367 --- .github/workflows/phpstan.yml | 2 +- Plugin/Catalog/Product/ChangeVideoUrlPlugin.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index f15bbe9..577f83b 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -9,4 +9,4 @@ jobs: - uses: actions/checkout@v4 - uses: extdn/github-actions-m2/magento-phpstan@master with: - composer_name: customgento/module-mass-update-tier-prices-m2 + composer_name: customgento/module-youtube-no-cookie-m2 diff --git a/Plugin/Catalog/Product/ChangeVideoUrlPlugin.php b/Plugin/Catalog/Product/ChangeVideoUrlPlugin.php index e7b955f..a451648 100644 --- a/Plugin/Catalog/Product/ChangeVideoUrlPlugin.php +++ b/Plugin/Catalog/Product/ChangeVideoUrlPlugin.php @@ -22,6 +22,9 @@ public function __construct(VideoUrlConverter $videoLinkConverter) $this->videoUrlConverter = $videoLinkConverter; } + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ public function afterGetMediaGalleryImages(Product $product, Collection $collection): Collection { $collection->walk(function (DataObject $object) { From cd632219e4a2e8b786d41ece984b00f82e82a590 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 5 Feb 2024 13:07:15 +0100 Subject: [PATCH 03/11] Add Int tests, DEV-367 --- .github/workflows/integration.yml | 351 ++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..988a8e8 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,351 @@ +name: ExtDN M2 Integration Tests +on: [ push, pull_request ] +jobs: + integration-tests-2-4-4-p6-8-1: + name: Magento 2-4-4-p6 php 8-1 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.4-p6 (PHP 8.1) + uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.4-p6' + composer_version: '2' + integration-tests-2-4-4-p6-7-4: + name: Magento 2-4-4-p6 php 7-4 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.4-p6 (PHP 7.4) + uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.4-p6' + composer_version: '2' + integration-tests-2-4-4-p5-7-4: + name: Magento 2-4-4-p5 php 7-4 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.4-p5 (PHP 7.4) + uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.4-p5' + composer_version: '2' + integration-tests-2-4-4-p5-8-1: + name: Magento 2.4.4-p5 php 8.1 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.4-p5 (PHP 8.1) + uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.4-p5' + composer_version: '2' + integration-tests-2-4-5-p5-8-1: + name: Magento 2.4.5-p5 php 8.1 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.5-p5 (PHP 8.1) + uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.5-p5' + composer_version: '2' + integration-tests-2-4-5-p5-7-4: + name: Magento 2.4.5-p5 php 7.4 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.5-p5 (PHP 7.4) + uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.5-p5' + composer_version: '2' + integration-tests-2-4-5-p4-7-4: + name: Magento 2.4.5-p4 php 7.4 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.5-p4 (PHP 7.4) + uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.5-p4' + composer_version: '2' + integration-tests-2-4-5-p4-8-1: + name: Magento 2.4.5-p4 php 8.1 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.5-p4 (PHP 8.1) + uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.5-p4' + composer_version: '2' + integration-tests-2-4-6-p3-8-1: + name: Magento 2.4.6-p3 php 8.1 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.6-p3 (PHP 8.1) + uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.6-p3' + composer_version: '2' + integration-tests-2-4-6-p3-8-2: + name: Magento 2.4.6-p3 php 8.2 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.6-p3 (PHP 8.2) + uses: extdn/github-actions-m2/magento-integration-tests/8.2@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.6-p3' + composer_version: '2' + integration-tests-2-4-6-p2-8-2: + name: Magento 2.4.6-p2 php 8.2 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.6-p2 (PHP 8.2) + uses: extdn/github-actions-m2/magento-integration-tests/8.2@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.6-p2' + composer_version: '2' + integration-tests-2-4-6-p2-8-1: + name: Magento 2.4.6-p2 php 8.1 Integration Tests + runs-on: ubuntu-latest + services: + mysql: + image: mysql:5.7 + env: + MYSQL_ROOT_PASSWORD: root + ports: + - 3306:3306 + options: --tmpfs /tmp:rw --tmpfs /var/lib/mysql:rw --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + es: + image: docker.io/wardenenv/elasticsearch:7.8 + ports: + - 9200:9200 + env: + 'discovery.type': single-node + 'xpack.security.enabled': false + ES_JAVA_OPTS: "-Xms64m -Xmx512m" + options: --health-cmd="curl localhost:9200/_cluster/health?wait_for_status=yellow&timeout=60s" --health-interval=10s --health-timeout=5s --health-retries=3 + steps: + - uses: actions/checkout@v4 + - name: M2 Integration Tests with Magento 2 Version 2.4.6-p2 (PHP 8.1) + uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + with: + module_name: CustomGento_YouTubeNoCookie + composer_name: customgento/module-youtube-no-cookie-m2 + ce_version: '2.4.6-p2' + composer_version: '2' From 7539d1bc001554d7ca1e94cbfbf02bfe9b31e713 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 5 Feb 2024 14:24:54 +0100 Subject: [PATCH 04/11] Add Int tests, DEV-367 --- Test/Integration/ProductPageVideoUrlTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Test/Integration/ProductPageVideoUrlTest.php b/Test/Integration/ProductPageVideoUrlTest.php index 4f0011a..2f582ee 100644 --- a/Test/Integration/ProductPageVideoUrlTest.php +++ b/Test/Integration/ProductPageVideoUrlTest.php @@ -16,8 +16,8 @@ public function testVideoUrlIsChangedOnConfigurableProductPage(): void $this->dispatch('catalog/product/view/id/1'); $body = $this->getResponse()->getBody(); - self::assertNotContains('youtube.com', $body); - self::assertNotContains('youtu.be', $body); - self::assertContains('youtube-nocookie.com', $body); + self::assertStringNotContainsString('youtube.com', $body); + self::assertStringNotContainsString('youtu.be', $body); + self::assertStringNotContainsString('youtube-nocookie.com', $body); } } From 4eb01fd3325c80796a1deff4f189b88bc53ea807 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 5 Feb 2024 14:33:32 +0100 Subject: [PATCH 05/11] Add Int tests, DEV-367 --- Test/Integration/ProductPageVideoUrlTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/Integration/ProductPageVideoUrlTest.php b/Test/Integration/ProductPageVideoUrlTest.php index 2f582ee..f1bfed0 100644 --- a/Test/Integration/ProductPageVideoUrlTest.php +++ b/Test/Integration/ProductPageVideoUrlTest.php @@ -18,6 +18,6 @@ public function testVideoUrlIsChangedOnConfigurableProductPage(): void $body = $this->getResponse()->getBody(); self::assertStringNotContainsString('youtube.com', $body); self::assertStringNotContainsString('youtu.be', $body); - self::assertStringNotContainsString('youtube-nocookie.com', $body); + self::assertStringContainsString('youtube-nocookie.com', $body); } } From 9a492bf0ed0c724322955ab2fafdffc150cfa1a9 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Wed, 7 Feb 2024 09:58:47 +0100 Subject: [PATCH 06/11] Fix int, DEV-363 --- .github/workflows/integration.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 988a8e8..a582724 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -2,7 +2,7 @@ name: ExtDN M2 Integration Tests on: [ push, pull_request ] jobs: integration-tests-2-4-4-p6-8-1: - name: Magento 2-4-4-p6 php 8-1 Integration Tests + name: Magento 2.4.4-p6 PHP 8.1 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -31,7 +31,7 @@ jobs: ce_version: '2.4.4-p6' composer_version: '2' integration-tests-2-4-4-p6-7-4: - name: Magento 2-4-4-p6 php 7-4 Integration Tests + name: Magento 2.4.4-p6 PHP 7.4 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -60,7 +60,7 @@ jobs: ce_version: '2.4.4-p6' composer_version: '2' integration-tests-2-4-4-p5-7-4: - name: Magento 2-4-4-p5 php 7-4 Integration Tests + name: Magento 2.4.4-p5 PHP 7.4 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -89,7 +89,7 @@ jobs: ce_version: '2.4.4-p5' composer_version: '2' integration-tests-2-4-4-p5-8-1: - name: Magento 2.4.4-p5 php 8.1 Integration Tests + name: Magento 2.4.4-p5 PHP 8.1 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -118,7 +118,7 @@ jobs: ce_version: '2.4.4-p5' composer_version: '2' integration-tests-2-4-5-p5-8-1: - name: Magento 2.4.5-p5 php 8.1 Integration Tests + name: Magento 2.4.5-p5 PHP 8.1 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -147,7 +147,7 @@ jobs: ce_version: '2.4.5-p5' composer_version: '2' integration-tests-2-4-5-p5-7-4: - name: Magento 2.4.5-p5 php 7.4 Integration Tests + name: Magento 2.4.5-p5 PHP 7.4 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -176,7 +176,7 @@ jobs: ce_version: '2.4.5-p5' composer_version: '2' integration-tests-2-4-5-p4-7-4: - name: Magento 2.4.5-p4 php 7.4 Integration Tests + name: Magento 2.4.5-p4 PHP 7.4 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -205,7 +205,7 @@ jobs: ce_version: '2.4.5-p4' composer_version: '2' integration-tests-2-4-5-p4-8-1: - name: Magento 2.4.5-p4 php 8.1 Integration Tests + name: Magento 2.4.5-p4 PHP 8.1 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -234,7 +234,7 @@ jobs: ce_version: '2.4.5-p4' composer_version: '2' integration-tests-2-4-6-p3-8-1: - name: Magento 2.4.6-p3 php 8.1 Integration Tests + name: Magento 2.4.6-p3 PHP 8.1 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -263,7 +263,7 @@ jobs: ce_version: '2.4.6-p3' composer_version: '2' integration-tests-2-4-6-p3-8-2: - name: Magento 2.4.6-p3 php 8.2 Integration Tests + name: Magento 2.4.6-p3 PHP 8.2 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -292,7 +292,7 @@ jobs: ce_version: '2.4.6-p3' composer_version: '2' integration-tests-2-4-6-p2-8-2: - name: Magento 2.4.6-p2 php 8.2 Integration Tests + name: Magento 2.4.6-p2 PHP 8.2 Integration Tests runs-on: ubuntu-latest services: mysql: @@ -321,7 +321,7 @@ jobs: ce_version: '2.4.6-p2' composer_version: '2' integration-tests-2-4-6-p2-8-1: - name: Magento 2.4.6-p2 php 8.1 Integration Tests + name: Magento 2.4.6-p2 PHP 8.1 Integration Tests runs-on: ubuntu-latest services: mysql: From 812a07006bad5689807365cd8c429b3fb8890fde Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 12 Feb 2024 11:51:37 +0100 Subject: [PATCH 07/11] Add unit, DEV-367 --- .github/workflows/unit-test.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/unit-test.yml diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml new file mode 100644 index 0000000..c4482c2 --- /dev/null +++ b/.github/workflows/unit-test.yml @@ -0,0 +1,20 @@ +name: ExtDN Actions +on: [push] +jobs: + unit-tests: + name: Magento 2 Unit Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-unit-tests/7.3@master + env: + MAGENTO_VERSION: '2.3.4' + - uses: extdn/github-actions-m2/magento-unit-tests/7.3@master + env: + MAGENTO_VERSION: '2.3.5-p2' + - uses: extdn/github-actions-m2/magento-unit-tests/7.4@master + env: + MAGENTO_VERSION: '2.4.0' From f77e0b524d79272c61bace45c2c5fa4b4e71ce12 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 12 Feb 2024 11:53:48 +0100 Subject: [PATCH 08/11] Add unit, DEV-367 --- .github/workflows/unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index c4482c2..7b7ee6a 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,4 +1,4 @@ -name: ExtDN Actions +name: ExtDN M2 Unit Tests on: [push] jobs: unit-tests: From d00591b5fd5b68aceac2a94a362a2a4f5fa520f6 Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 12 Feb 2024 12:09:20 +0100 Subject: [PATCH 09/11] Add unit tests, DEV-367 --- .github/workflows/unit-test.yml | 120 +++++++++++++++++++++++++++++--- 1 file changed, 112 insertions(+), 8 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 7b7ee6a..c100e50 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,20 +1,124 @@ name: ExtDN M2 Unit Tests on: [push] jobs: - unit-tests: - name: Magento 2 Unit Tests + unit-tests-2-4-4-p6-8-1: + name: Magento 2.4.4-p6 PHP 8.1 Integration Tests runs-on: ubuntu-latest env: MODULE_NAME: CustomGento_YouTubeNoCookie COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-unit-tests/7.3@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: - MAGENTO_VERSION: '2.3.4' - - uses: extdn/github-actions-m2/magento-unit-tests/7.3@master + MAGENTO_VERSION: '2.4.4-p6' + integration-tests-2-4-4-p6-7-4: + name: Magento 2.4.4-p6 PHP 7.4 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + env: + MAGENTO_VERSION: '2.4.4-p6' + integration-tests-2-4-4-p5-7-4: + name: Magento 2.4.4-p5 PHP 7.4 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + env: + MAGENTO_VERSION: '2.4.4-p5' + integration-tests-2-4-4-p5-8-1: + name: Magento 2.4.4-p5 PHP 8.1 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + env: + MAGENTO_VERSION: '2.4.4-p5' + integration-tests-2-4-5-p5-8-1: + name: Magento 2.4.5-p5 PHP 8.1 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + env: + MAGENTO_VERSION: '2.4.5-p5' + integration-tests-2-4-5-p5-7-4: + name: Magento 2.4.5-p5 PHP 7.4 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master env: - MAGENTO_VERSION: '2.3.5-p2' - - uses: extdn/github-actions-m2/magento-unit-tests/7.4@master + MAGENTO_VERSION: '2.4.5-p5' + integration-tests-2-4-5-p4-7-4: + name: Magento 2.4.5-p4 PHP 7.4 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + env: + MAGENTO_VERSION: '2.4.5-p4' + integration-tests-2-4-5-p4-8-1: + name: Magento 2.4.5-p4 PHP 8.1 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + env: + MAGENTO_VERSION: '2.4.5-p4' + integration-tests-2-4-6-p3-8-1: + name: Magento 2.4.6-p3 PHP 8.1 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + env: + MAGENTO_VERSION: '2.4.6-p3' + integration-tests-2-4-6-p3-8-2: + name: Magento 2.4.6-p3 PHP 8.2 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/8.2@master + env: + MAGENTO_VERSION: '2.4.6-p3' + integration-tests-2-4-6-p2-8-1: + name: Magento 2.4.6-p2 PHP 8.1 Integration Tests + runs-on: ubuntu-latest + env: + MODULE_NAME: CustomGento_YouTubeNoCookie + COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 + steps: + - uses: actions/checkout@v4 + - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master env: - MAGENTO_VERSION: '2.4.0' + MAGENTO_VERSION: '2.4.6-p2' From acdc8c89f99c5f4df7424136ee1dbdbf12e4278d Mon Sep 17 00:00:00 2001 From: Iman Aboheydary Date: Mon, 12 Feb 2024 12:13:28 +0100 Subject: [PATCH 10/11] Fix typo, DEV-367 --- .github/workflows/unit-test.yml | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index c100e50..9b567f9 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -12,7 +12,7 @@ jobs: - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: MAGENTO_VERSION: '2.4.4-p6' - integration-tests-2-4-4-p6-7-4: + unit-tests-2-4-4-p6-7-4: name: Magento 2.4.4-p6 PHP 7.4 Integration Tests runs-on: ubuntu-latest env: @@ -20,10 +20,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + - uses: extdn/github-actions-m2/magento-unit-tests/7.4@master env: MAGENTO_VERSION: '2.4.4-p6' - integration-tests-2-4-4-p5-7-4: + unit-tests-2-4-4-p5-7-4: name: Magento 2.4.4-p5 PHP 7.4 Integration Tests runs-on: ubuntu-latest env: @@ -31,10 +31,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + - uses: extdn/github-actions-m2/magento-unit-tests/7.4@master env: MAGENTO_VERSION: '2.4.4-p5' - integration-tests-2-4-4-p5-8-1: + unit-tests-2-4-4-p5-8-1: name: Magento 2.4.4-p5 PHP 8.1 Integration Tests runs-on: ubuntu-latest env: @@ -42,10 +42,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: MAGENTO_VERSION: '2.4.4-p5' - integration-tests-2-4-5-p5-8-1: + unit-tests-2-4-5-p5-8-1: name: Magento 2.4.5-p5 PHP 8.1 Integration Tests runs-on: ubuntu-latest env: @@ -53,10 +53,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: MAGENTO_VERSION: '2.4.5-p5' - integration-tests-2-4-5-p5-7-4: + unit-tests-2-4-5-p5-7-4: name: Magento 2.4.5-p5 PHP 7.4 Integration Tests runs-on: ubuntu-latest env: @@ -64,10 +64,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + - uses: extdn/github-actions-m2/magento-unit-tests/7.4@master env: MAGENTO_VERSION: '2.4.5-p5' - integration-tests-2-4-5-p4-7-4: + unit-tests-2-4-5-p4-7-4: name: Magento 2.4.5-p4 PHP 7.4 Integration Tests runs-on: ubuntu-latest env: @@ -75,10 +75,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/7.4@master + - uses: extdn/github-actions-m2/magento-unit-tests/7.4@master env: MAGENTO_VERSION: '2.4.5-p4' - integration-tests-2-4-5-p4-8-1: + unit-tests-2-4-5-p4-8-1: name: Magento 2.4.5-p4 PHP 8.1 Integration Tests runs-on: ubuntu-latest env: @@ -86,10 +86,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: MAGENTO_VERSION: '2.4.5-p4' - integration-tests-2-4-6-p3-8-1: + unit-tests-2-4-6-p3-8-1: name: Magento 2.4.6-p3 PHP 8.1 Integration Tests runs-on: ubuntu-latest env: @@ -97,10 +97,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: MAGENTO_VERSION: '2.4.6-p3' - integration-tests-2-4-6-p3-8-2: + unit-tests-2-4-6-p3-8-2: name: Magento 2.4.6-p3 PHP 8.2 Integration Tests runs-on: ubuntu-latest env: @@ -108,10 +108,10 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/8.2@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.2@master env: MAGENTO_VERSION: '2.4.6-p3' - integration-tests-2-4-6-p2-8-1: + unit-tests-2-4-6-p2-8-1: name: Magento 2.4.6-p2 PHP 8.1 Integration Tests runs-on: ubuntu-latest env: @@ -119,6 +119,6 @@ jobs: COMPOSER_NAME: customgento/module-youtube-no-cookie-m2 steps: - uses: actions/checkout@v4 - - uses: extdn/github-actions-m2/magento-integration-tests/8.1@master + - uses: extdn/github-actions-m2/magento-unit-tests/8.1@master env: MAGENTO_VERSION: '2.4.6-p2' From b9955efa116edd4b72d858e3a8bd2b4d1d257e3b Mon Sep 17 00:00:00 2001 From: Simon Sprankel Date: Wed, 14 Feb 2024 08:00:08 +0100 Subject: [PATCH 11/11] Update GitHub Action trigger, DEV-367 --- .github/workflows/unit-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 9b567f9..31f4945 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -1,5 +1,5 @@ name: ExtDN M2 Unit Tests -on: [push] +on: [push, pull_request] jobs: unit-tests-2-4-4-p6-8-1: name: Magento 2.4.4-p6 PHP 8.1 Integration Tests