Skip to content

Commit

Permalink
Use scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
joernott committed Apr 23, 2024
1 parent 67f2042 commit 94adc2c
Showing 1 changed file with 7 additions and 54 deletions.
61 changes: 7 additions & 54 deletions .github/oxid-esales/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ runscript: &runscript
"shop:tests-integration",
"shop:tests-codeception",
"setup:tests-codeception-shopSetup",
"unit:",
"integration:",
"codeception:",
"shop_setup:",
"deprecated:"
"shop:~/Unit.sh",
"shop:~/Integration.sh",
"shop:~/Codeception.sh",
"setup:~ShopSetup.sh",
"deprecated:~/Deprecated.sh"
]
shop: &shop
path: 'vendor/{{ $org}}/{{ $name }}'
Expand All @@ -65,26 +65,8 @@ runscript: &runscript
cd vendor/oxid-esales/oxideshop-ce
composer config -g github-oauth.github.com "${GITHUB_TOKEN}"
composer update --no-interaction
unit:
<<: *shop
custom_script_container: |
cd vendor/{{ $org}}/{{ $name }}
vendor/bin/phpunit -c phpunit.xml --bootstrap tests/bootstrap.php --coverage-clover=tests/Reports/coverage_phpunit_unit.xml --log-junit tests/Reports/phpunit-unit.xml tests/Unit 2>&1 | tee tests/Output/unit_tests.txt
integration:
<<: *shop
custom_script_container: |
cd vendor/{{ $org}}/{{ $name }}
vendor/bin/phpunit -c phpunit.xml --bootstrap tests/bootstrap.php --coverage-clover=tests/Reports/coverage_phpunit_integration.xml tests/Integration 2>&1 | tee tests/Output/integration_tests.txt
codeception:
<<: *shop
container:
options: '-e SELENIUM_SERVER_HOST=selenium -e BROWSER_NAME=chrome -e DB_NAME=setup_test -e DB_USERNAME=root -e DB_PASSWORD=root -e DB_HOST=mysql -e DB_PORT=3306 -e SHOP_URL=http://localhost.local/ -e SHOP_SOURCE_PATH=/var/www/vendor/oxid-esales/oxideshop-ce/source/ -e THEME_ID=apex -e SHOP_ROOT_PATH=/var/www'
custom_script_container: |
cd vendor/{{ $org}}/{{ $name }}
vendor/bin/codecept build -c tests/codeception.yml",
vendor/bin/codecept run acceptanceSetup -c tests/codeception.yml --ext DotReporter 2>&1 | tee tests/Output/codeception_ShopSetup.txt"
deprecated:
<<: *shop
path: 'vendor/{{ $org}}/{{ $name }}'
composer:
transform: |
{
Expand All @@ -95,26 +77,11 @@ runscript: &runscript
"phpunit/phpunit": "^9.1.1"
}
}
container:
options: '-e XDEBUG_MODE=coverage -e SHOP_PATH=vendor/{{ $org}}/{{ $name }}/source -e SHOP_TESTS_PATH=vendor/{{ $org}}/{{ $name }}/tests'
custom_script: |
cp source/vendor/oxid-esales/testing-library/test_config.yml.dist source/test_config.yml
#sed -e "s|shop_tests_path:.*|shop_tests_path: 'vendor/oxid-esales/tests'|" \
# -e "s|shop_path:.*|shop_path: 'vendor/oxid-esales/oxideshop-ce/source'|" \
# -i source/test_config.yml
cp source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php source/source/config.inc.php
cp source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php source/config.inc.php
custom_script_container: |
php vendor/bin/runtests \
--coverage-clover=tests/Reports/deprecated_tests_coverage.xml \
AllTestsUnit 2>&1 \
| tee "tests/Output/deprecated_tests.txt"
reset_shop: false
runslim:
<<: *runscript
matrix:
script: '["shop:phpcs-report"]'
script: '["shop:~/PhpCsReport.sh"]'
# script: |
# [
# "shop:phpcs-report",
Expand All @@ -123,20 +90,6 @@ runslim:
# "shop:phpstan-baseline"
# ]

runtest:
matrix:
testplan: '["-"]'
container:
options: '-e XDEBUG_MODE=coverage -e SHOP_PATH=vendor/{{ $org}}/{{ $name }}/source -e SHOP_TESTS_PATH=vendor/{{ $org}}/{{ $name }}/tests'
custom_script: |
cp source/vendor/oxid-esales/testing-library/test_config.yml.dist source/test_config.yml
#sed -e "s|shop_tests_path:.*|shop_tests_path: 'vendor/oxid-esales/tests'|" \
# -e "s|shop_path:.*|shop_path: 'vendor/oxid-esales/oxideshop-ce/source'|" \
# -i source/test_config.yml
cp source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php source/source/config.inc.php
cp source/vendor/oxid-esales/oxideshop-ce/source/config.inc.php source/config.inc.php
reset_shop: false

sonarcloud:
matrix:
testplan: '["-","~/sonarcloud_oxideshop_ce_internal.yml"]'
Expand Down

0 comments on commit 94adc2c

Please sign in to comment.