Skip to content

Commit

Permalink
Revert "OXDEV-8657 Switch to light workflow"
Browse files Browse the repository at this point in the history
This reverts commit bd845d5.
  • Loading branch information
NikolaIvanovski committed Sep 16, 2024
1 parent bd845d5 commit f927094
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 119 deletions.
157 changes: 54 additions & 103 deletions .github/oxid-esales/module-gdproptin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,124 +2,75 @@
# {{ $org := "oxid-esales" }}organisation: {{ print $org }}
# {{ $name := "gdpr-optin-module" }}name: {{ print $name }}
# {{ $order := "01" }}order: {{ print $order }}
#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.RunID }}'
# 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-esales/gdpr-optin-module/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'
prepare_shop:
git:
shop_ref: '{{ .Data.global.git.default_ref }}'

#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

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-esales/gdpr-optin-module": "{{ .Data.global.composer.ref_name }}"
},
"repositories": {
"oxid-esales/gdpr-optin-module": {
"type": "git",
"url": "https://github.com/OXID-eSales/gdpr-optin-module.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 oegdproptin
vendor/bin/oe-console oe:theme:activate apex
prefix: &install_module_prefix 'moduleInstallation-ce-{{ .Github.SHA }}-{{ .Github.RunID }}'
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

runscript: &runscript
codeception:
matrix:
script: |
[
"gdpr_module:tests-unit",
"gdpr_module:tests-integration",
"gdpr_module:tests-codeception"
]
composer:
early: true
gdpr_module:
path: 'vendor/oxid-esales/gdpr-optin-module'
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-esales/gdpr-optin-module/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: |
[
"gdpr_module:phpcs",
"gdpr_module:phpstan",
"gdpr_module:phpmd"
]
testplan: 'skip'
title: '{{ print $name }}-{{ print $order }}'
load_shop: *install_module_prefix

sonarcloud:
matrix:
testplan: '["-"]'
strip_path: '/var/www/vendor/oxid-esales/gdpr-optin-module/'
project_key: 'OXID-eSales_gdpr-optin-module'
project_name: 'oxid-esales/gdpr-optin-module'
title: '{{ print $name }}-{{ print $order }}'
project_key: 'OXID-eSales_{{ print $name }}'
project_name: *package_name
parameters: |
-Dsonar.language=php
-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 }}'
5 changes: 3 additions & 2 deletions .github/workflows/dispatch_module.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Manual trigger
# Matrix workflow using re-usable github actions

on:
workflow_dispatch:
Expand Down Expand Up @@ -47,7 +48,7 @@ jobs:
dispatch_stable:
if: ${{ inputs.use_dev_version == 'no' }}
needs: build_testplan
uses: oxid-eSales/github-actions/.github/workflows/call-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"'
Expand All @@ -66,7 +67,7 @@ jobs:
dispatch_v0:
if: ${{ inputs.use_dev_version == 'v0' }}
needs: build_testplan
uses: oxid-eSales/github-actions/.github/workflows/call-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"'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
module_gdproptin_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-gdproptin.yaml'
runs_on: '"ubuntu-latest"'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
module-gdproptin_php82_mysql80:
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-gdproptin.yaml'
runs_on: '"ubuntu-latest"'
Expand Down
16 changes: 4 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@
"squizlabs/php_codesniffer": "3.*",
"phpmd/phpmd": "^2.11",
"oxid-esales/oxideshop-ce": "dev-b-7.1.x",
"phpunit/phpunit": "^10.5",
"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"
"phpunit/phpunit": "^10.5"
},
"conflict": {
"oxid-esales/oxideshop-ce": "<7.0"
Expand Down Expand Up @@ -58,13 +51,12 @@
"@phpmd"
],

"tests-unit": "XDEBUG_MODE=coverage vendor/bin/phpunit --config=tests/ --testsuite=Unit --coverage-clover=tests/Reports/coverage_unit_module-template.xml",
"tests-integration": "XDEBUG_MODE=coverage vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/ --testsuite=Integration --coverage-clover=tests/Reports/coverage_integration_module-template.xml",
"phpunit": "vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/",
"phpunit-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/reports/coverage",

"tests-codeception": [
"codeception": [
"Composer\\Config::disableProcessTimeout",
"THEME_ID=apex MODULE_IDS=oegdproptin SHOP_ROOT_PATH=/var/www vendor/bin/codecept run Acceptance -c tests/codeception.yml --no-redirect"
"THEME_ID=apex MODULE_IDS=oegdproptin /var/www/vendor/bin/codecept run Acceptance -c /var/www/vendor/oxid-esales/gdpr-optin-module/tests/codeception.yml --no-redirect"
]
},
"config": {
Expand Down

0 comments on commit f927094

Please sign in to comment.