From e9e78cd835c269ec308bbc46a7549a821518eff0 Mon Sep 17 00:00:00 2001 From: Anna Kotiuk <79214317+annakotiuk@users.noreply.github.com> Date: Tue, 21 Jan 2025 15:21:27 +0100 Subject: [PATCH] SSP-75 Add feature label condition for ci actions. (#9301) Improve BuddyCI for features --- buddy.yml | 19 ++++++--- codeception.acceptance.feature.yml | 44 ++++++++++++++++++++ codeception.functional.feature.yml | 53 +++++++++++++++++++++++++ codeception.functional.glue.feature.yml | 24 +++++++++++ 4 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 codeception.acceptance.feature.yml create mode 100644 codeception.functional.feature.yml create mode 100644 codeception.functional.glue.feature.yml diff --git a/buddy.yml b/buddy.yml index adef06b79e..bcd932c1d7 100644 --- a/buddy.yml +++ b/buddy.yml @@ -810,12 +810,19 @@ - '.ci/snippet/REQUIRE docker/sdk boot -v deploy.ci.functional.mariadb.yml' - '.ci/snippet/REQUIRE docker/sdk up -t' - '.ci/snippet/RUN docker/sdk testing composer dump-autoload -o -a --apcu' - - '.ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.stage0.yml' - - '.ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.stage1.yml' - - '.ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.yml' - - '.ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional2.yml' - - '.ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.stage2.yml' - - '.ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.glue.yml' + - | + if [[ "$BUDDY_RUN_PR_LABELS" != *"feature-ci"* || "$BUDDY_RUN_PR_LABELS" == *"feature-and-core-ci"* ]]; then + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.stage0.yml + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.stage1.yml + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.yml + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional2.yml + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.stage2.yml + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.glue.yml + fi + - | + if [[ "$BUDDY_RUN_PR_LABELS" == *"feature-ci"* || "$BUDDY_RUN_PR_LABELS" == *"feature-and-core-ci"* ]]; then + .ci/snippet/RUN docker/sdk testing codecept run -c codeception.functional.feature.yml + fi - '.ci/snippet/FINISH' run_next_parallel: true variables: diff --git a/codeception.acceptance.feature.yml b/codeception.acceptance.feature.yml new file mode 100644 index 0000000000..c9020e7ca5 --- /dev/null +++ b/codeception.acceptance.feature.yml @@ -0,0 +1,44 @@ +namespace: PyzTest +actor: Tester + +include: + - vendor/spryker/spryker/Features/*/* + +paths: + tests: tests + output: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs + +settings: + suite_class: \PHPUnit_Framework_TestSuite + colors: true + memory_limit: 2048M + log: true + +extensions: + enabled: + - \SprykerTest\Shared\Testify\Helper\WebDriverHelper + - \SprykerTest\Shared\Testify\Helper\SuiteFilterHelper + config: + \SprykerTest\Shared\Testify\Helper\WebDriverHelper: + suites: ['Presentation'] + path: '%SPRYKER_TEST_WEB_DRIVER_BIN%' + whitelisted-ips: '' + webdriver-port: '%SPRYKER_TEST_WEB_DRIVER_PORT%' + url-base: '/wd/hub' + remote-enable: '%SPRYKER_TESTING_ENABLED%' + host: '%SPRYKER_TEST_WEB_DRIVER_HOST%' + browser: '%SPRYKER_TEST_IN_BROWSER%' + capabilities: + 'goog:chromeOptions': + args: ['--headless', '--no-sandbox', '--disable-dev-shm-usage'] + binary: '%SPRYKER_TEST_BROWSER_BIN%' + \SprykerTest\Shared\Testify\Helper\SuiteFilterHelper: + inclusive: + - Presentation + +params: + - tests/default.yml + - env diff --git a/codeception.functional.feature.yml b/codeception.functional.feature.yml new file mode 100644 index 0000000000..7f97403344 --- /dev/null +++ b/codeception.functional.feature.yml @@ -0,0 +1,53 @@ +namespace: PyzTest +actor: Tester + +include: + - vendor/spryker/spryker/Features/*/* + +paths: + tests: tests + output: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs + +settings: + suite_class: \PHPUnit_Framework_TestSuite + colors: true + memory_limit: 2048M + log: true + lint: false + +coverage: + enabled: true + remote: true + c3_url: 'http://backoffice.de.shop-suite.local' + whitelist: { include: ['src/Pyz/*.php'] } + +extensions: + enabled: + - \SprykerTest\Shared\Testify\Helper\SuiteFilterHelper + config: + \SprykerTest\Shared\Testify\Helper\SuiteFilterHelper: + exclusive: + - Api + - AsyncApi + - Glue + - Presentation + # ProductPageSearchListenerTest fails if runs after something + # see codeception.functional.stage0.yml + - ProductPageSearchListenerTest + # Zed & Client SearchElasticsearch tests always fail if running AFTER Shared SearchElasticsearch tests + # see codeception.functional.stage2.yml + - SearchElasticsearch + - SalesOrderThreshold + # Also see FacetQueryExpanderPluginFilteredQueryTest::createFilteredStringFacetDataWithMultipleValues + - SearchClientBCTest + - SearchFacadeBCTest + # ACL breadcrumbs tests falls due to no user in session (AclNavigationItemCollectionFilterPlugin) + - AclGroupCreateCest + - AclGroupEditCest + - AclGroupListCest + - AclRoleCreateCest + - AclRoleEditCest + - AclRoleListCest diff --git a/codeception.functional.glue.feature.yml b/codeception.functional.glue.feature.yml new file mode 100644 index 0000000000..ddcaec1536 --- /dev/null +++ b/codeception.functional.glue.feature.yml @@ -0,0 +1,24 @@ +namespace: PyzTest +actor: Tester + +include: + - vendor/spryker/spryker/Features/*/*/SprykerFeatureTest/Glue/ + +paths: + tests: tests + output: tests/_output + data: tests/_data + support: tests/_support + envs: tests/_envs + +settings: + suite_class: \PHPUnit_Framework_TestSuite + colors: true + memory_limit: 1024M + log: true + +coverage: + enabled: true + remote: true + c3_url: 'http://backoffice.de.shop-suite.local' + whitelist: { include: ['src/Pyz/*.php'] }