diff --git a/.github/fresh-advance/module-invoice.yml b/.github/fresh-advance/module-invoice.yml index 5d55e12..1503326 100644 --- a/.github/fresh-advance/module-invoice.yml +++ b/.github/fresh-advance/module-invoice.yml @@ -1,36 +1,40 @@ -install_shop_with_modules: +install: cache: prepared_shop: false + git: + repository: 'Fresh-Advance/Invoice' + ref: &ref '{{ .Github.RefName }}' + shop_url: 'https://github.com/Fresh-Advance/Invoice.git' + shop_ref: *ref composer: + root_url: '' transform: | { "require": { "oxid-esales/oxideshop-ce": "{{ .Data.global.composer.dev_ref }}", "oxid-esales/twig-admin-theme": "{{ .Data.global.composer.dev_ref }}", - "oxid-esales/twig-theme": "{{ .Data.global.composer.dev_ref }}", - "oxid-esales/developer-tools": "{{ .Data.global.composer.dev_ref }}", - "fresh-advance/invoice": "dev-{{ .Github.RefName }}" - }, - "repositories": { - "fresh-advance/invoice": { - "type": "git", - "url": "https://github.com/Fresh-Advance/Invoice.git" - } + "oxid-esales/twig-theme": "{{ .Data.global.composer.dev_ref }}" } } 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:install ./ vendor/bin/oe-console oe:module:activate fa_invoice vendor/bin/oe-console oe:theme:activate twig +install_shop_with_modules: + composer: + root_url: '' + runscript: &runscript matrix: script: | [ "fa_invoice:tests-clover", + "fa_invoice:tests-codeception", ] fa_invoice: - path: 'vendor/fresh-advance/invoice' + path: '' runslim: <<: *runscript @@ -45,7 +49,7 @@ runslim: sonarcloud: matrix: testplan: '["-"]' - strip_path: '/var/www/vendor/fresh-advance/invoice/' + strip_path: '/var/www/' project_name: 'Invoice' project_key: 'Fresh-Advance_Invoice' organization: 'fresh-advance' diff --git a/.gitignore b/.gitignore index 1071821..6ac3c34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ /composer.lock -/Coverage /source /var -/vendor \ No newline at end of file +/vendor diff --git a/composer.json b/composer.json index dc8972c..d641399 100644 --- a/composer.json +++ b/composer.json @@ -35,12 +35,18 @@ "codeception/module-filesystem": "^3.0", "codeception/module-webdriver": "^3.1", "oxid-esales/codeception-modules": "dev-b-7.0.x", - "oxid-esales/codeception-page-objects": "dev-b-7.0.x" + "oxid-esales/codeception-page-objects": "dev-b-7.0.x", + "oxid-esales/developer-tools": "dev-b-7.0.x" }, "autoload": { "psr-4": { - "FreshAdvance\\Invoice\\": "./src", - "FreshAdvance\\Invoice\\Tests\\": "./tests" + "FreshAdvance\\Invoice\\": "./src" + } + }, + "autoload-dev": { + "psr-4": { + "FreshAdvance\\Invoice\\Tests\\": "./tests", + "OxidEsales\\EshopCommunity\\Tests\\": "./vendor/oxid-esales/oxideshop-ce/tests" } }, "scripts": { @@ -55,17 +61,17 @@ ], "tests-unit": "vendor/bin/phpunit --bootstrap=/var/www/source/bootstrap.php --config=tests/", - "tests-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/result/coverage", + "tests-coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --bootstrap=/var/www/source/bootstrap.php --config=tests/ --coverage-html=tests/Reports/CoverageHtml", "tests-clover": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --coverage-clover=tests/Reports/coverage_fa_invoice.xml --bootstrap=/var/www/source/bootstrap.php --config=tests/", "tests-codeception": [ "Composer\\Config::disableProcessTimeout", - "MODULE_IDS=fa_invoice SHOP_ROOT_PATH=/var/www/ vendor/bin/codecept run Acceptance -c tests/codeception.yml" + "MODULE_IDS=fa_invoice vendor/bin/codecept run Acceptance -c tests/codeception.yml" ] }, "config": { "allow-plugins": { - "oxid-esales/oxideshop-composer-plugin": false, + "oxid-esales/oxideshop-composer-plugin": true, "oxid-esales/oxideshop-unified-namespace-generator": true } } diff --git a/tests/Codeception/Acceptance.suite.yml b/tests/Codeception/Acceptance.suite.yml index 4753a29..31e2c1d 100644 --- a/tests/Codeception/Acceptance.suite.yml +++ b/tests/Codeception/Acceptance.suite.yml @@ -64,7 +64,7 @@ modules: paths: - Application/views/admin_twig - Application/views/twig - - ../vendor/fresh-advance/invoice/views/admin_twig + - ../views/admin_twig - \OxidEsales\Codeception\Module\OxideshopModules step_decorators: diff --git a/tests/Codeception/Config/params.php b/tests/Codeception/Config/params.php index a9dc310..2d934c7 100644 --- a/tests/Codeception/Config/params.php +++ b/tests/Codeception/Config/params.php @@ -12,10 +12,6 @@ use OxidEsales\Codeception\Module\Database\DatabaseDefaultsFileGenerator; use Symfony\Component\Filesystem\Path; -if ($shopRootPath = getenv('SHOP_ROOT_PATH')){ - require_once($shopRootPath . '/source/bootstrap.php'); -} - $facts = new Facts(); return [ 'SHOP_URL' => $facts->getShopUrl(), diff --git a/tests/Reports/.gitignore b/tests/Reports/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/tests/Reports/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore