diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index e103e66936a44f6422cb417611e319935f18dd93..0000000000000000000000000000000000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,14 +0,0 @@ -variables: - DISABLE_FUNCTIONAL: 1 - DISABLE_ACCEPTANCE: 1 - DISABLE_PHP_5_5: 1 - -fake job: - image: composer:2.0 - rules: - - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - when: never - - if: $CI_PROJECT_NAME == 'gitlab-ci' - when: always - script: - - echo "It works" diff --git a/composer.json b/composer.json deleted file mode 100644 index 871f22c161f983d4368a7510c5598e893787bfda..0000000000000000000000000000000000000000 --- a/composer.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "wpdesk/gitlab-ci", - "authors": [ - { - "name": "Grzegorz", - "email": "grola@wpdesk.pl" - } - ], - "prefer-stable": true, - "minimum-stability": "dev", - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "<7", - "wp-coding-standards/wpcs": "^0.14.1", - "squizlabs/php_codesniffer": "^3.0.2", - "mockery/mockery": "*", - "10up/wp_mock": "*", - "wimg/php-compatibility": "^8" - }, - "scripts": { - "test": "echo composer is alive", - "phpcs": "phpcs", - "phpunit-unit": "phpunit --configuration phpunit-unit.xml --coverage-text --colors=never", - "phpunit-unit-fast": "phpunit --configuration phpunit-unit.xml --no-coverage", - "phpunit-integration": "phpunit --configuration phpunit-integration.xml --coverage-text --colors=never", - "phpunit-integration-fast": "phpunit --configuration phpunit-integration.xml --no-coverage", - - "docs": "apigen generate" - } -} diff --git a/phpunit-integration.xml b/phpunit-integration.xml deleted file mode 100644 index 420f62bc26bd4f2ede3def45cdd371ad32f2397d..0000000000000000000000000000000000000000 --- a/phpunit-integration.xml +++ /dev/null @@ -1,27 +0,0 @@ -<phpunit bootstrap="tests/integration/bootstrap.php" - backupGlobals="false" - > - <testsuites> - <testsuite name="tests"> - <directory prefix="test-" suffix=".php">./tests/integration</directory> - </testsuite> - </testsuites> - - <filter> - <whitelist> - <directory suffix=".php">classes</directory> - </whitelist> - </filter> - - <logging> - <log type="junit" target="build-coverage/report.junit.xml"/> - <log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/> - <log type="coverage-text" target="build-coverage/coverage.txt"/> - <log type="coverage-clover" target="build-coverage/clover.xml"/> - </logging> - <php> - <env name="WP_DEVELOP_DIR" value="/tmp/wordpress-develop"/> - <env name="WC_DEVELOP_DIR" value="/tmp/woocommerce"/> - </php> - -</phpunit> \ No newline at end of file diff --git a/phpunit-unit.xml b/phpunit-unit.xml deleted file mode 100644 index 627771b41d48361153c75eb0d810a063e6d6680f..0000000000000000000000000000000000000000 --- a/phpunit-unit.xml +++ /dev/null @@ -1,21 +0,0 @@ -<phpunit bootstrap="tests/unit/bootstrap.php"> - <testsuites> - <testsuite> - <directory prefix="test-" suffix=".php">./tests/unit/</directory> - </testsuite> - </testsuites> - - <filter> - <whitelist> - <directory suffix=".php">classes</directory> - </whitelist> - </filter> - - <logging> - <log type="junit" target="build-coverage/report.junit.xml"/> - <log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/> - <log type="coverage-text" target="build-coverage/coverage.txt"/> - <log type="coverage-clover" target="build-coverage/clover.xml"/> - </logging> - -</phpunit> \ No newline at end of file diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php deleted file mode 100644 index 4d0ecae5d90707249e923c0e1317a18f7abd8fad..0000000000000000000000000000000000000000 --- a/tests/integration/bootstrap.php +++ /dev/null @@ -1,26 +0,0 @@ -<?php -// disable xdebug backtrace -if ( function_exists( 'xdebug_disable' ) ) { - xdebug_disable(); -} - -if ( getenv( 'DEPENDENT_PLUGINS_DIR' ) !== false ) { - define( 'DEPENDENT_PLUGINS_DIR', getenv( 'DEPENDENT_PLUGINS_DIR' ) ); -} else { - define( 'DEPENDENT_PLUGINS_DIR', '/tmp/plugins' ); -} - - -if ( getenv( 'PLUGIN_PATH' ) !== false ) { - define( 'PLUGIN_PATH', getenv( 'PLUGIN_PATH' ) ); -} else { - define( 'PLUGIN_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR ); -} - -require_once( getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/functions.php' ); - -tests_add_filter( 'muplugins_loaded', function () { -}, 100 ); - -putenv('WP_TESTS_DIR=' . getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit'); -require_once( getenv( 'WC_DEVELOP_DIR' ) . '/tests/bootstrap.php' ); \ No newline at end of file diff --git a/tests/unit/bootstrap.php b/tests/unit/bootstrap.php deleted file mode 100644 index e55059f69f9265d81aa3a4afa8c679633a5a6ad9..0000000000000000000000000000000000000000 --- a/tests/unit/bootstrap.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * PHPUnit bootstrap file - */ - -require_once __DIR__ . '/../../vendor/autoload.php'; - -error_reporting( E_ALL ); - -if ( getenv( 'PLUGIN_PATH' ) !== false ) { - define( 'PLUGIN_PATH', getenv( 'PLUGIN_PATH' ) ); -} else { - define( 'PLUGIN_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR ); -} - -if ( getenv( 'ABSPATH' ) !== false ) { - define( 'ABSPATH', getenv( 'ABSPATH' ) ); -} else { - define( 'ABSPATH', PLUGIN_PATH . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR ); -} - -WP_Mock::setUsePatchwork( true ); -WP_Mock::bootstrap();