From 442f6e2cb62dde138d8863245dfdecf1f734a876 Mon Sep 17 00:00:00 2001 From: Nikola Ivanovski Date: Mon, 16 Sep 2024 11:16:51 +0300 Subject: [PATCH] Revert "OXDEV-8657 Switch to light workflow" This reverts commit 9e4fd3c44f68750d0ee8307ca5bec759ebe4b1fd. --- .github/oxid-esales/module-usercentrics.yaml | 153 +++++++------------ .github/workflows/dispatch_module.yaml | 4 +- .github/workflows/schedule.yaml | 2 +- .github/workflows/trigger.yaml | 2 +- composer.json | 15 +- 5 files changed, 58 insertions(+), 118 deletions(-) diff --git a/.github/oxid-esales/module-usercentrics.yaml b/.github/oxid-esales/module-usercentrics.yaml index c23b8cb..8e000fb 100644 --- a/.github/oxid-esales/module-usercentrics.yaml +++ b/.github/oxid-esales/module-usercentrics.yaml @@ -2,116 +2,57 @@ # {{ $org := "oxid-professional-services" }} # {{ $name := "usercentrics" }} # {{ $order := "01" }} -#prepare_shop: -# git: -# shop_ref: '{{ .Data.global.git.default_ref }}' -# -#install_module: -# matrix: -# testplan: '["-"]' -# title: '{{ print $name }}-{{ print $order }}' -# cache: -# prefix: &install_module_prefix 'moduleInstallation-ce-{{ .Github.SHA }}-{{ .Github.RunNumber }}-{{ .Github.RunAttempt }}' -# ids: &ids '{{ print $ids }}' -# activate: *ids -# git: -# module: -# url: &git_module_url '{{ .Github.Repository }}' -# ref: '{{ .Github.RefName }}' -# package_name: &package_name '{{ print $org }}/{{ print $name }}' -# path: *ids -# -#phpunit: -# matrix: -# testplan: '["~/defaults/module_phpunit_unit.yaml","~/defaults/module_phpunit_integration.yaml"]' -# load_shop: *install_module_prefix -# -#codeception: -# matrix: -# testplan: '["-"]' -# load_shop: *install_module_prefix -# title: '{{ print $name }}-{{ print $order }}' -# container: -# options: '-e SELENIUM_SERVER_HOST=selenium -e BROWSER_NAME=chrome -e XDEBUG_MODE=coverage -e THEME_ID=apex' -# configuration: '/var/www/vendor/oxid-professional-services/usercentrics/tests/codeception.yml' -# suite: 'Acceptance' -# additional_options: '--coverage-xml=/var/www/codeception_coverage.xml' -# logfile: -# prefix: 'codeception' -# output: -# prefix: 'codeception-artifacts' -# coverage: -# path: 'source/codeception_coverage.xml' -# -#runtest: -# matrix: -# testplan: 'skip' -# title: '{{ print $name }}-{{ print $order }}' -# load_shop: *install_module_prefix -# -#phpcs_tests: -# skip: true -# -#styles: -# matrix: -# testplan: '["-"]' -# title: '{{ print $name }}-{{ print $order }}' -# load_shop: *install_module_prefix -# path: *ids -# module_ids: *ids +prepare_shop: + git: + shop_ref: '{{ .Data.global.git.default_ref }}' -install_shop_with_modules: +install_module: + matrix: + testplan: '["-"]' + title: '{{ print $name }}-{{ print $order }}' cache: - prepared_shop: false - composer: - transform: | - { - "require": { - "oxid-esales/oxideshop-ce": "{{ .Data.global.composer.dev_ref }}", - "oxid-esales/twig-component": "{{ .Data.global.composer.dev_ref }}", - "oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}", - "oxid-esales/apex-theme": "{{ .Data.global.composer.dev_ref }}", - "oxid-professional-services/usercentrics": "{{ .Data.global.composer.ref_name }}" - }, - "repositories": { - "oxid-professional-services/usercentrics": { - "type": "git", - "url": "https://github.com/OXID-eSales/usercentrics.git" - } - } - } - custom_script_container: | - vendor/bin/oe-console oe:database:reset --db-host=mysql --db-port=3306 --db-name=example --db-user=root --db-password=root --force - vendor/bin/oe-console oe:module:activate oxps_usercentrics - vendor/bin/oe-console oe:theme:activate apex + prefix: &install_module_prefix 'moduleInstallation-ce-{{ .Github.SHA }}-{{ .Github.RunNumber }}-{{ .Github.RunAttempt }}' + ids: &ids '{{ print $ids }}' + activate: *ids + git: + module: + url: &git_module_url '{{ .Github.Repository }}' + ref: '{{ .Github.RefName }}' + package_name: &package_name '{{ print $org }}/{{ print $name }}' + path: *ids -runscript: &runscript +phpunit: matrix: - script: | - [ - "usercentrics_module:tests-unit", - "usercentrics_module:tests-integration", - "usercentrics_module:tests-codeception" - ] - composer: - early: true - usercentrics_module: - path: 'vendor/oxid-professional-services/usercentrics/' + testplan: '["~/defaults/module_phpunit_unit.yaml","~/defaults/module_phpunit_integration.yaml"]' + load_shop: *install_module_prefix + +codeception: + matrix: + testplan: '["-"]' + load_shop: *install_module_prefix + title: '{{ print $name }}-{{ print $order }}' + container: + options: '-e SELENIUM_SERVER_HOST=selenium -e BROWSER_NAME=chrome -e XDEBUG_MODE=coverage -e THEME_ID=apex' + configuration: '/var/www/vendor/oxid-professional-services/usercentrics/tests/codeception.yml' + suite: 'Acceptance' + additional_options: '--coverage-xml=/var/www/codeception_coverage.xml' + logfile: + prefix: 'codeception' + output: + prefix: 'codeception-artifacts' + coverage: + path: 'source/codeception_coverage.xml' -runslim: - <<: *runscript +runtest: matrix: - script: | - [ - "usercentrics_module:phpcs", - "usercentrics_module:phpstan", - "usercentrics_module:phpmd" - ] + testplan: 'skip' + title: '{{ print $name }}-{{ print $order }}' + load_shop: *install_module_prefix sonarcloud: matrix: testplan: '["-"]' - strip_path: '/var/www/vendor/oxid-professional-services/usercentrics/' + title: '{{ print $name }}-{{ print $order }}' project_key: 'OXID-eSales_usercentrics' project_name: 'oxid-esales/usercentrics' parameters: | @@ -119,7 +60,17 @@ sonarcloud: -Dsonar.scm.provider=git -Dsonar.sources=src -Dsonar.tests=tests - -Dsonar.php.phpstan.reportPaths=coverage-reports/phpstan.report.json + +phpcs_tests: + skip: true + +styles: + matrix: + testplan: '["-"]' + title: '{{ print $name }}-{{ print $order }}' + load_shop: *install_module_prefix + path: *ids + module_ids: *ids finish: slack_title: 'Module {{ print $name }} ({{ .Github.RefName }}) on {{ .Github.Repository }} by {{ .Github.Actor }}' diff --git a/.github/workflows/dispatch_module.yaml b/.github/workflows/dispatch_module.yaml index 23309a1..bfdbbe9 100644 --- a/.github/workflows/dispatch_module.yaml +++ b/.github/workflows/dispatch_module.yaml @@ -48,7 +48,7 @@ jobs: dispatch_stable: if: ${{ inputs.use_dev_version == 'no' }} needs: build_testplan - uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4 + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yaml@v4 with: testplan: ${{ needs.build_testplan.outputs.testplan }} runs_on: '"ubuntu-latest"' @@ -67,7 +67,7 @@ jobs: dispatch_v0: if: ${{ inputs.use_dev_version == 'v0' }} needs: build_testplan - uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v0 + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yaml@v0 with: testplan: ${{ needs.build_testplan.outputs.testplan }} runs_on: '"ubuntu-latest"' diff --git a/.github/workflows/schedule.yaml b/.github/workflows/schedule.yaml index de7fdf1..689e5d2 100644 --- a/.github/workflows/schedule.yaml +++ b/.github/workflows/schedule.yaml @@ -6,7 +6,7 @@ on: jobs: usercentrics_71x_nightly: - uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4 + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yaml@v4 with: testplan: '~/defaults/7.1.x.yaml,~/defaults/scheduled.yaml,~/module-usercentrics.yaml' runs_on: '"ubuntu-latest"' diff --git a/.github/workflows/trigger.yaml b/.github/workflows/trigger.yaml index da157e9..dc56d8a 100644 --- a/.github/workflows/trigger.yaml +++ b/.github/workflows/trigger.yaml @@ -9,7 +9,7 @@ on: jobs: usercentrics_php82_mysql_80: - uses: oxid-eSales/github-actions/.github/workflows/universal_workflow_light.yaml@v4 + uses: oxid-eSales/github-actions/.github/workflows/call-universal_test_workflow.yaml@v4 with: testplan: '~/defaults/7.1.x.yaml,~/module-usercentrics.yaml' runs_on: '"ubuntu-latest"' diff --git a/composer.json b/composer.json index 54c7cdd..1f8976a 100644 --- a/composer.json +++ b/composer.json @@ -16,15 +16,7 @@ "phpunit/phpunit": "^10.5", "phpstan/phpstan": "^1.10", "squizlabs/php_codesniffer": "^3.8", - "phpmd/phpmd": "^2.15", - "codeception/codeception": "*", - "codeception/module-asserts": "*", - "codeception/module-db": "*", - "codeception/module-filesystem": "*", - "codeception/module-webdriver": "*", - "oxid-esales/codeception-modules": "dev-b-7.1.x", - "oxid-esales/codeception-page-objects": "dev-b-7.1.x", - "mikey179/vfsstream": "^1.6" + "phpmd/phpmd": "^2.15" }, "autoload": { "psr-4": { @@ -53,10 +45,7 @@ "tests-integration": "phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/ --testsuite=Integration", "tests-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/result/coverage", - "tests-codeception": [ - "Composer\\Config::disableProcessTimeout", - "THEME_ID=apex MODULE_IDS=oxps_usercentrics SHOP_ROOT_PATH=/var/www vendor/bin/codecept run Acceptance -c tests/codeception.yml --no-redirect" - ], + "tests-codeception": "THEME_ID=apex MODULE_IDS=oxps_usercentrics /var/www/vendor/bin/codecept run Acceptance -c /var/www/vendor/oxid-professional-services/usercentrics/tests/codeception.yml", "tests-all": [ "@tests-unit",