From 814ec86efde0b69abe9acd6fc9f0a174b3830b2e Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 6 Jun 2023 08:00:18 +0100 Subject: [PATCH 01/10] fix: unit test checking for wrong format --- .../Directory/Test/Unit/Model/CurrencyTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php b/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php index a3a6b6826366..7fdafafe2d7f 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php @@ -143,11 +143,11 @@ public function getOutputFormatDataProvider(): array 'en_US:PLN' => ['en_US', 'PLN', "PLN\u{00A0}%s"], 'en_US:PKR' => ['en_US', 'PKR', "PKR\u{00A0}%s"], 'af_ZA:VND' => ['af_ZA', 'VND', "\u{20AB}%s"], - 'ar_DZ:EGP' => ['ar_DZ', 'EGP', "\u{062C}.\u{0645}.\u{200F}\u{00A0}%s"], - 'ar_SA:USD' => ['ar_SA', 'USD', "%s\u{00A0}US$"], - 'ar_SA:LBP' => ['ar_SA', 'LBP', "%s\u{00A0}\u{0644}.\u{0644}.\u{200F}"], + 'ar_DZ:EGP' => ['ar_DZ', 'EGP', "\u{200F}%s\u{00A0}\u{062C}.\u{0645}.\u{200F}"], + 'ar_SA:USD' => ['ar_SA', 'USD', "\u{200F}%s\u{00A0}US$"], + 'ar_SA:LBP' => ['ar_SA', 'LBP', "\u{200F}%s\u{00A0}\u{0644}.\u{0644}.\u{200F}"], 'fa_IR:USD' => ['fa_IR', 'USD', "\u{200E}$%s"], - 'ar_KW:USD' => ['ar_KW', 'USD', "%s\u{00A0}US$"], + 'ar_KW:USD' => ['ar_KW', 'USD', "\u{200F}%s\u{00A0}US$"], 'bn_BD:IQD' => ['bn_BD', 'IQD', "%s\u{00A0}IQD"], 'ca_ES:VND' => ['ca_ES', 'VND', "%s\u{00A0}\u{20AB}"], 'de_DE:USD' => ['de_DE', 'USD', "%s\u{00A0}$"], @@ -205,8 +205,8 @@ public function getFormatTxtNumberFormatterDataProvider(): array ['en_US', 'USD', '9999', [], '$9,999.00'], ['en_US', 'EUR', '9999', [], '€9,999.00'], ['en_US', 'LBP', '9999', [], "LBP\u{00A0}9,999"], - ['ar_SA', 'USD', '9', [], "\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}US$"], - ['ar_SA', 'AED', '9', [], "\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}\u{062F}.\u{0625}.\u{200F}"], + ['ar_SA', 'USD', '9', [], "\u{200F}\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}US$"], + ['ar_SA', 'AED', '9', [], "\u{200F}\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}\u{062F}.\u{0625}.\u{200F}"], ['de_DE', 'USD', '9999', [], "9.999,00\u{00A0}$"], ['de_DE', 'EUR', '9999', [], "9.999,00\u{00A0}€"], ['en_US', 'USD', '9999', ['display' => CurrencyData::NO_SYMBOL, 'precision' => 2], '9,999.00'], @@ -218,14 +218,14 @@ public function getFormatTxtNumberFormatterDataProvider(): array 'USD', '9999', ['display' => CurrencyData::NO_SYMBOL], - "\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" + "\u{200F}\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" ], [ 'ar_SA', 'AED', '9999', ['display' => CurrencyData::NO_SYMBOL], - "\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" + "\u{200F}\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" ], ['en_US', 'USD', ' 9999', ['display' => CurrencyData::NO_SYMBOL], '9,999.00'], ['en_US', 'USD', '9999', ['precision' => 1], '$9,999.0'], From bb23e8b23a63b34b661203b729bd848ed25a9520 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 6 Jun 2023 08:06:25 +0100 Subject: [PATCH 02/10] feat: initial add of unit tests leveraging Nx --- .github/workflows/unit-tests.yml | 13 +++++++++++++ supported-services.json | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/unit-tests.yml create mode 100644 supported-services.json diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 000000000000..e9a5ca7aa2ac --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,13 @@ +name: Unit Tests +run-name: ${{ github.actor }} is running Unit Tests +on: + pull_request: + branches: + - 2.4-develop + +permissions: + contents: write + +jobs: + run-unit-tests: + uses: mage-os/infrastructure/.github/workflows/unit-tests.yml@main \ No newline at end of file diff --git a/supported-services.json b/supported-services.json new file mode 100644 index 000000000000..db11fc5c6880 --- /dev/null +++ b/supported-services.json @@ -0,0 +1,8 @@ +{ + "services": { + "php": [ + 8.1, + 8.2 + ] + } +} \ No newline at end of file From 6eab84c0b2f157222dc079626de7704c02175045 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Jul 2023 06:59:18 +0100 Subject: [PATCH 03/10] debug --- .github/workflows/unit-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index e9a5ca7aa2ac..c3a87f67703c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -4,10 +4,11 @@ on: pull_request: branches: - 2.4-develop + - nx-unit-testing permissions: contents: write jobs: run-unit-tests: - uses: mage-os/infrastructure/.github/workflows/unit-tests.yml@main \ No newline at end of file + uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing \ No newline at end of file From c6a9ccf81a1b95aa42548a9d067e8d0398591019 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Jul 2023 07:18:06 +0100 Subject: [PATCH 04/10] debug --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c3a87f67703c..c11cb2ea6732 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -11,4 +11,4 @@ permissions: jobs: run-unit-tests: - uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing \ No newline at end of file + uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing From 573da85c53a95b5aa4fdb0f515c3c05006a2dc41 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Jul 2023 07:26:10 +0100 Subject: [PATCH 05/10] debug --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c11cb2ea6732..c3a87f67703c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -11,4 +11,4 @@ permissions: jobs: run-unit-tests: - uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing + uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing \ No newline at end of file From abaa391b64a8f7c672ec8bce847b0d2cd8a20f9b Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Jul 2023 07:38:46 +0100 Subject: [PATCH 06/10] debug --- .github/workflows/unit-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c3a87f67703c..21f35ab6aea9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -11,4 +11,5 @@ permissions: jobs: run-unit-tests: - uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing \ No newline at end of file + uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing + \ No newline at end of file From 6a8bcb91f0498b3e8a7ee675f42ea83f6b7358fa Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Jul 2023 08:49:43 +0100 Subject: [PATCH 07/10] debug --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 21f35ab6aea9..0592c52d3a3a 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,4 +12,4 @@ permissions: jobs: run-unit-tests: uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing - \ No newline at end of file + From 602d8ccc5264426087cc84877eb5978f8b8187e4 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Jul 2023 09:14:55 +0100 Subject: [PATCH 08/10] debug --- .../Directory/Test/Unit/Model/CurrencyTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php b/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php index 7fdafafe2d7f..a3a6b6826366 100644 --- a/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php +++ b/app/code/Magento/Directory/Test/Unit/Model/CurrencyTest.php @@ -143,11 +143,11 @@ public function getOutputFormatDataProvider(): array 'en_US:PLN' => ['en_US', 'PLN', "PLN\u{00A0}%s"], 'en_US:PKR' => ['en_US', 'PKR', "PKR\u{00A0}%s"], 'af_ZA:VND' => ['af_ZA', 'VND', "\u{20AB}%s"], - 'ar_DZ:EGP' => ['ar_DZ', 'EGP', "\u{200F}%s\u{00A0}\u{062C}.\u{0645}.\u{200F}"], - 'ar_SA:USD' => ['ar_SA', 'USD', "\u{200F}%s\u{00A0}US$"], - 'ar_SA:LBP' => ['ar_SA', 'LBP', "\u{200F}%s\u{00A0}\u{0644}.\u{0644}.\u{200F}"], + 'ar_DZ:EGP' => ['ar_DZ', 'EGP', "\u{062C}.\u{0645}.\u{200F}\u{00A0}%s"], + 'ar_SA:USD' => ['ar_SA', 'USD', "%s\u{00A0}US$"], + 'ar_SA:LBP' => ['ar_SA', 'LBP', "%s\u{00A0}\u{0644}.\u{0644}.\u{200F}"], 'fa_IR:USD' => ['fa_IR', 'USD', "\u{200E}$%s"], - 'ar_KW:USD' => ['ar_KW', 'USD', "\u{200F}%s\u{00A0}US$"], + 'ar_KW:USD' => ['ar_KW', 'USD', "%s\u{00A0}US$"], 'bn_BD:IQD' => ['bn_BD', 'IQD', "%s\u{00A0}IQD"], 'ca_ES:VND' => ['ca_ES', 'VND', "%s\u{00A0}\u{20AB}"], 'de_DE:USD' => ['de_DE', 'USD', "%s\u{00A0}$"], @@ -205,8 +205,8 @@ public function getFormatTxtNumberFormatterDataProvider(): array ['en_US', 'USD', '9999', [], '$9,999.00'], ['en_US', 'EUR', '9999', [], '€9,999.00'], ['en_US', 'LBP', '9999', [], "LBP\u{00A0}9,999"], - ['ar_SA', 'USD', '9', [], "\u{200F}\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}US$"], - ['ar_SA', 'AED', '9', [], "\u{200F}\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}\u{062F}.\u{0625}.\u{200F}"], + ['ar_SA', 'USD', '9', [], "\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}US$"], + ['ar_SA', 'AED', '9', [], "\u{0669}\u{066B}\u{0660}\u{0660}\u{00A0}\u{062F}.\u{0625}.\u{200F}"], ['de_DE', 'USD', '9999', [], "9.999,00\u{00A0}$"], ['de_DE', 'EUR', '9999', [], "9.999,00\u{00A0}€"], ['en_US', 'USD', '9999', ['display' => CurrencyData::NO_SYMBOL, 'precision' => 2], '9,999.00'], @@ -218,14 +218,14 @@ public function getFormatTxtNumberFormatterDataProvider(): array 'USD', '9999', ['display' => CurrencyData::NO_SYMBOL], - "\u{200F}\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" + "\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" ], [ 'ar_SA', 'AED', '9999', ['display' => CurrencyData::NO_SYMBOL], - "\u{200F}\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" + "\u{0669}\u{066C}\u{0669}\u{0669}\u{0669}\u{066B}\u{0660}\u{0660}" ], ['en_US', 'USD', ' 9999', ['display' => CurrencyData::NO_SYMBOL], '9,999.00'], ['en_US', 'USD', '9999', ['precision' => 1], '$9,999.0'], From 44b0615edfb13f244b5e20ee369a4b8e800c2829 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 17 Jul 2023 13:48:38 +0100 Subject: [PATCH 09/10] chore: point back to mage-os infra repo for unit test yml --- .github/workflows/unit-tests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0592c52d3a3a..bc53e661d535 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -4,12 +4,11 @@ on: pull_request: branches: - 2.4-develop - - nx-unit-testing permissions: contents: write jobs: run-unit-tests: - uses: adamzero1/mage-os-infrastructure/.github/workflows/unit-tests.yml@nx-unit-testing + uses: mage-os/infrastructure/.github/workflows/unit-tests.yml From 15df818d9af9ae467d2fa75935e17eeec8798e7e Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 17 Jul 2023 13:53:32 +0100 Subject: [PATCH 10/10] fix: missing version for yml path --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index bc53e661d535..7f315225d956 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -10,5 +10,5 @@ permissions: jobs: run-unit-tests: - uses: mage-os/infrastructure/.github/workflows/unit-tests.yml + uses: mage-os/infrastructure/.github/workflows/unit-tests.yml@main