diff --git a/.drone.yml b/.drone.yml index 2ac5ed92cd652..1c8999a890888 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,6 @@ steps: commands: - composer validate --no-check-all --strict - composer install --no-progress --no-suggest - - patch -N -p0 < tests/patch/phpunit8_php8_match.patch || echo "Ignore this error." - name: phpcs image: joomlaprojects/docker-images:php7.2 @@ -163,9 +162,16 @@ steps: commands: - npm run lint:js + - name: prepare_codeception_tests + depends_on: + - npm + image: joomlaprojects/docker-images:systemtests + commands: + - php libraries/vendor/bin/codecept build + - name: phpmin-api-mysql depends_on: - - javascript-cs + - prepare_codeception_tests image: joomlaprojects/docker-images:systemtests environment: JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 @@ -194,8 +200,7 @@ steps: - name: phpmin-api-postgres depends_on: - # - phpnext-api-mysql - - phpmin-api-mysql + - prepare_codeception_tests image: joomlaprojects/docker-images:systemtests failure: ignore environment: @@ -226,7 +231,7 @@ steps: - name: phpmin-system-mysql depends_on: - - javascript-cs + - phpmax-api-mysql - phpmax-api-postgres image: joomlaprojects/docker-images:systemtests failure: ignore @@ -235,16 +240,6 @@ steps: commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql -# - name: phpnext-system-mysql -# depends_on: -# - phpmin-system-mysql -# image: joomlaprojects/docker-images:systemtests8.2 -# failure: ignore -# environment: -# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 -# commands: -# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext - - name: phpmax-system-mysql depends_on: # - phpnext-system-mysql @@ -256,41 +251,29 @@ steps: commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpmax -# - name: phpnext-system-mysql8 -# depends_on: -# - phpmax-system-mysql -# image: joomlaprojects/docker-images:systemtests8.2 -# failure: ignore -# environment: -# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 -# commands: -# - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext + # - name: phpnext-system-mysql + # depends_on: + # - phpmin-system-mysql + # image: joomlaprojects/docker-images:systemtests8.2 + # failure: ignore + # environment: + # JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 + # commands: + # - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysqlphpnext - - name: phpmax-system-mysql8 + - name: phpmin-system-postgres depends_on: -# - phpnext-system-mysql - - phpmax-system-mysql - image: joomlaprojects/docker-images:systemtests8.1 - failure: ignore + - phpmax-api-mysql + - phpmax-api-postgres + image: joomlaprojects/docker-images:systemtests environment: JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpmax - -# - name: phpnext-system-postgres -# depends_on: -# - phpmax-system-mysql8 -# image: joomlaprojects/docker-images:systemtests8.2 -# failure: ignore -# environment: -# JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 -# commands: -# - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext + - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres - name: phpmax-system-postgres depends_on: -# - phpnext-system-mysql8 - - phpmax-system-mysql8 + - phpmin-system-postgres image: joomlaprojects/docker-images:systemtests8.1 failure: ignore environment: @@ -298,21 +281,45 @@ steps: commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpmax + # - name: phpnext-system-postgres + # depends_on: + # - phpmax-system-mysql8 + # image: joomlaprojects/docker-images:systemtests8.2 + # failure: ignore + # environment: + # JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 + # commands: + # - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgresphpnext + - name: phpmin-system-mysql8 - depends_on: [ phpmax-system-postgres ] + depends_on: + - phpmax-api-mysql + - phpmax-api-postgres image: joomlaprojects/docker-images:systemtests environment: JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8 - - name: phpmin-system-postgres - depends_on: [ phpmin-system-mysql8 ] - image: joomlaprojects/docker-images:systemtests + - name: phpmax-system-mysql8 + depends_on: + - phpmin-system-mysql8 + image: joomlaprojects/docker-images:systemtests8.1 + failure: ignore environment: JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 commands: - - bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres + - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpmax + + # - name: phpnext-system-mysql8 + # depends_on: + # - phpmax-system-mysql + # image: joomlaprojects/docker-images:systemtests8.2 + # failure: ignore + # environment: + # JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK: 1 + # commands: + # - bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql8phpnext - name: artifacts-system-tests image: cschlosser/drone-ftps @@ -350,9 +357,6 @@ steps: status: - failure -branches: - exclude: [ l10n_* ] - volumes: - name: composer-cache host: @@ -420,6 +424,6 @@ steps: --- kind: signature -hmac: 24b9cf86c8dcb5efc6b7c0dfc7bd774410f81907d228eb63931224449953d9fe +hmac: a97a38d569f1f6ee9edf79060905561e9017e73ff781d62d152cfe2a6887c046 ... diff --git a/tests/Codeception/acceptance.suite.dist.yml b/tests/Codeception/acceptance.suite.dist.yml index bf2c61ac1275b..7e3713801dbb6 100644 --- a/tests/Codeception/acceptance.suite.dist.yml +++ b/tests/Codeception/acceptance.suite.dist.yml @@ -45,6 +45,8 @@ error_level: "E_ALL & ~E_STRICT & ~E_DEPRECATED" env: postgres: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -57,6 +59,8 @@ env: dsn: 'pgsql:host=postgres;dbname=test_joomla' prefix: 'jos_' mysql8: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -67,6 +71,8 @@ env: Helper\JoomlaDb: prefix: 'jos_' mysql: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -76,6 +82,8 @@ env: Helper\JoomlaDb: prefix: 'jos_' postgresphpmax: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -88,6 +96,8 @@ env: dsn: 'pgsql:host=postgres;dbname=test_joomla' prefix: 'phpmax_' mysql8phpmax: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -98,6 +108,8 @@ env: Helper\JoomlaDb: prefix: 'phpmax_' mysqlphpmax: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -107,6 +119,8 @@ env: Helper\JoomlaDb: prefix: 'phpmax_' postgresphpnext: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -119,6 +133,8 @@ env: dsn: 'pgsql:host=postgres;dbname=test_joomla' prefix: 'phpnext_' mysql8phpnext: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: @@ -129,6 +145,8 @@ env: Helper\JoomlaDb: prefix: 'phpnext_' mysqlphpnext: + paths: + log: /drone/src/tests/Codeception/_output modules: config: Joomla\Browser\JoomlaBrowser: diff --git a/tests/Codeception/drone-api-run.sh b/tests/Codeception/drone-api-run.sh index fa1c4825f3b2b..b4e1e7cd80815 100644 --- a/tests/Codeception/drone-api-run.sh +++ b/tests/Codeception/drone-api-run.sh @@ -22,7 +22,7 @@ echo "Waiting 6 seconds till Selenium is ready..." sleep 6 echo "[RUNNER] Run Codeception" -php libraries/vendor/bin/codecept build +cd /tests/www/$DB_ENGINE php libraries/vendor/bin/codecept run --fail-fast --steps --debug --env $DB_ENGINE tests/Codeception/acceptance/01-install/ # If you have found this line failing on OSX you need to brew install gnu-sed like we mentioned in the codeception readme! diff --git a/tests/Codeception/drone-system-run.sh b/tests/Codeception/drone-system-run.sh index d936d1ee0366e..3b1f1f3b9af50 100644 --- a/tests/Codeception/drone-system-run.sh +++ b/tests/Codeception/drone-system-run.sh @@ -29,5 +29,5 @@ echo "Waiting 6 seconds till Selenium is ready..." sleep 6 echo "[RUNNER] Run Codeception" -php libraries/vendor/bin/codecept build -php libraries/vendor/bin/codecept run --fail-fast --steps --debug --env $DB_ENGINE tests/Codeception/acceptance/ +cd /tests/www/$DB_ENGINE +php libraries/vendor/bin/codecept run acceptance --fail-fast --steps --debug --env $DB_ENGINE diff --git a/tests/Codeception/exclude.txt b/tests/Codeception/exclude.txt index b81dcf6241cd9..34bab97967e50 100644 --- a/tests/Codeception/exclude.txt +++ b/tests/Codeception/exclude.txt @@ -3,14 +3,12 @@ build dev node_modules -tests .appveyor.yml .drone.yml .editorconfig .gitignore .php-cs-fixer.dist.php build.xml -codeception.yml composer.json composer.lock crowdin.yml diff --git a/tests/patch/phpunit8_php8_match.patch b/tests/patch/phpunit8_php8_match.patch deleted file mode 100644 index cf7986a0af5ca..0000000000000 --- a/tests/patch/phpunit8_php8_match.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: libraries/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php -=================================================================== ---- libraries/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php (date 1596445870909) -+++ libraries/vendor/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php (date 1596445870909) -@@ -12,7 +12,7 @@ - /** - * @internal This class is not covered by the backward compatibility promise for PHPUnit - */ --interface ParametersMatch extends Match -+interface ParametersMatch extends Stub - { - /** - * Sets the parameters to match for, each parameter to this function will