29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-16 09:02:52 +00:00
cms/.drone.yml

203 lines
5.5 KiB
YAML
Raw Normal View History

---
kind: pipeline
name: default
2019-04-28 12:41:10 +00:00
clone:
depth: 42
2017-02-12 13:32:55 +00:00
steps:
- name: restore-cache
image: drillster/drone-volume-cache
settings:
2018-07-28 15:28:57 +00:00
restore: true
mount:
- ./node_modules
- ./libraries/vendor
- ./administrator/components/com_media/node_modules
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
volumes:
- name: cache
path: /cache
2018-07-28 15:28:57 +00:00
- name: composer
image: joomlaprojects/docker-tools:develop
depends_on: [ restore-cache ]
2017-02-12 10:40:56 +00:00
commands:
2018-04-02 17:17:42 +00:00
- composer install --no-progress --no-suggest
- name: phpcs
image: joomlaprojects/docker-images:php7.2
depends_on: [ composer ]
failure: ignore
commands:
- echo $(date)
- ./libraries/vendor/bin/phpcs --config-set installed_paths ../../joomla/cms-coding-standards/lib,../../joomla/coding-standards/Joomla/ExampleRulesets,../../joomla/coding-standards
- ./libraries/vendor/bin/phpcs --config-set colors 1
- ./libraries/vendor/bin/phpcs --config-set php_version 70200
- ./libraries/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php --ignore=libraries/vendor/*,tests/*,build/*,node_modules/*,media/*,libraries/autoload_psr4.php,installation\template\error.php -p --standard=libraries/vendor/joomla/cms-coding-standards/lib/Joomla-CMS .
- echo $(date)
- name: npm
image: joomlaprojects/docker-tools:develop
depends_on: [ phpcs ]
commands:
- npm install --unsafe-perm
- name: rebuild-cache
image: drillster/drone-volume-cache
depends_on: [ npm ]
settings:
rebuild: true
mount:
- ./node_modules
- ./libraries/vendor
- ./administrator/components/com_media/node_modules
cache_key: [ DRONE_REPO_NAMESPACE, DRONE_REPO_NAME, DRONE_BRANCH, DRONE_STAGE_NUMBER ]
volumes:
- name: cache
path: /cache
2019-05-08 19:49:59 +00:00
- name: php72-unit
depends_on: [ phpcs ]
2019-05-08 19:49:59 +00:00
image: php:7.2
commands:
2019-05-08 19:49:59 +00:00
- php -v
Feature/unit tests (#23986) * Move unit tests back to repository * Update config files * Psr-4 autoload tests * Namespace JHtmlTests * Delete unused html test files * Add base unit test case * Namespace Cms Tests * Refactoring JLayoutBaseTest * Delete JPaginationObjectTest We do not test constructors! ;-D * Refactor JToolbarButtonCustomTest * Remove JToolbarButtonTest We should not test constructor params and getters/setters * Refactor JToolbarTests * Refactor JVersionTest * Run all library tests in the library suite * Move JAccessTests to new unit suite * Refactor JAccessRulesTest * Add JAccessRuleTest * Add to string test * Remove JGrid (Class does not exist anymore) * Remove JDocumentRendererTest JDocumentRenderer is abstract class with only a public getter * Rename tests/unit to tests/Unit * CS * Fix path to bootstrap file * CS * Re-enable, fix and refactor JDocumentTest * Refactor and re-enable JBrowserTest * Refactor and re-enable JObjectTest * Use Joomla\Tests as root namespace * Refactor and re-enable JFeedParserAtomTest * Rename mock * Namespace JHtmlStringTest * Refactor and re-enable JFeedParserRssTest * Refactor and re-enable JFeedEntryTest * Use assertArrayHasKey * Improve FeedEntry tests * Refactor and re-enable JFeedFactoryTest * Refactor and re-enable JFeedLinkTest * Rename JFeedLinkTest To FeedLinkTest * Remove JFeedPersonTest we dont test simple constructors * Add expectation * Refactor and re-enable JFeedParserTest * CS * Refactor and re-enable JFeedTest * Refactor and re-enable JMailHelperTest * Fix bug in Mail class * Refactor and re-enable MailTest * Refactor and re-enable JMicrodataTest * Remove JPlatformTest * Remove tmp dir * Fix namespaces * Delete JLoaderTest It heavily depends on filesystem and therefore should be tested with integration tests.
2019-03-10 14:20:06 +00:00
- ./libraries/vendor/bin/phpunit
2019-05-08 19:49:59 +00:00
- name: php73-unit
depends_on: [ phpcs ]
2019-05-08 19:49:59 +00:00
image: php:7.3
commands:
2019-05-08 19:49:59 +00:00
- php -v
Feature/unit tests (#23986) * Move unit tests back to repository * Update config files * Psr-4 autoload tests * Namespace JHtmlTests * Delete unused html test files * Add base unit test case * Namespace Cms Tests * Refactoring JLayoutBaseTest * Delete JPaginationObjectTest We do not test constructors! ;-D * Refactor JToolbarButtonCustomTest * Remove JToolbarButtonTest We should not test constructor params and getters/setters * Refactor JToolbarTests * Refactor JVersionTest * Run all library tests in the library suite * Move JAccessTests to new unit suite * Refactor JAccessRulesTest * Add JAccessRuleTest * Add to string test * Remove JGrid (Class does not exist anymore) * Remove JDocumentRendererTest JDocumentRenderer is abstract class with only a public getter * Rename tests/unit to tests/Unit * CS * Fix path to bootstrap file * CS * Re-enable, fix and refactor JDocumentTest * Refactor and re-enable JBrowserTest * Refactor and re-enable JObjectTest * Use Joomla\Tests as root namespace * Refactor and re-enable JFeedParserAtomTest * Rename mock * Namespace JHtmlStringTest * Refactor and re-enable JFeedParserRssTest * Refactor and re-enable JFeedEntryTest * Use assertArrayHasKey * Improve FeedEntry tests * Refactor and re-enable JFeedFactoryTest * Refactor and re-enable JFeedLinkTest * Rename JFeedLinkTest To FeedLinkTest * Remove JFeedPersonTest we dont test simple constructors * Add expectation * Refactor and re-enable JFeedParserTest * CS * Refactor and re-enable JFeedTest * Refactor and re-enable JMailHelperTest * Fix bug in Mail class * Refactor and re-enable MailTest * Refactor and re-enable JMicrodataTest * Remove JPlatformTest * Remove tmp dir * Fix namespaces * Delete JLoaderTest It heavily depends on filesystem and therefore should be tested with integration tests.
2019-03-10 14:20:06 +00:00
- ./libraries/vendor/bin/phpunit
2019-05-08 19:49:59 +00:00
- name: php74-unit
depends_on: [ phpcs ]
2019-05-08 19:49:59 +00:00
image: phpdaily/php:7.4-dev
failure: ignore
2019-05-08 19:49:59 +00:00
commands:
- php -v
- ./libraries/vendor/bin/phpunit
- name: php80-unit
depends_on: [ phpcs ]
2019-05-08 19:49:59 +00:00
image: phpdaily/php:8.0-dev
failure: ignore
commands:
2019-05-08 19:49:59 +00:00
- php -v
Feature/unit tests (#23986) * Move unit tests back to repository * Update config files * Psr-4 autoload tests * Namespace JHtmlTests * Delete unused html test files * Add base unit test case * Namespace Cms Tests * Refactoring JLayoutBaseTest * Delete JPaginationObjectTest We do not test constructors! ;-D * Refactor JToolbarButtonCustomTest * Remove JToolbarButtonTest We should not test constructor params and getters/setters * Refactor JToolbarTests * Refactor JVersionTest * Run all library tests in the library suite * Move JAccessTests to new unit suite * Refactor JAccessRulesTest * Add JAccessRuleTest * Add to string test * Remove JGrid (Class does not exist anymore) * Remove JDocumentRendererTest JDocumentRenderer is abstract class with only a public getter * Rename tests/unit to tests/Unit * CS * Fix path to bootstrap file * CS * Re-enable, fix and refactor JDocumentTest * Refactor and re-enable JBrowserTest * Refactor and re-enable JObjectTest * Use Joomla\Tests as root namespace * Refactor and re-enable JFeedParserAtomTest * Rename mock * Namespace JHtmlStringTest * Refactor and re-enable JFeedParserRssTest * Refactor and re-enable JFeedEntryTest * Use assertArrayHasKey * Improve FeedEntry tests * Refactor and re-enable JFeedFactoryTest * Refactor and re-enable JFeedLinkTest * Rename JFeedLinkTest To FeedLinkTest * Remove JFeedPersonTest we dont test simple constructors * Add expectation * Refactor and re-enable JFeedParserTest * CS * Refactor and re-enable JFeedTest * Refactor and re-enable JMailHelperTest * Fix bug in Mail class * Refactor and re-enable MailTest * Refactor and re-enable JMicrodataTest * Remove JPlatformTest * Remove tmp dir * Fix namespaces * Delete JLoaderTest It heavily depends on filesystem and therefore should be tested with integration tests.
2019-03-10 14:20:06 +00:00
- ./libraries/vendor/bin/phpunit
- name: javascript-cs
depends_on: [ npm ]
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- npm run lint:js
- name: javascript-tests
depends_on: [ npm ]
image: joomlaprojects/docker-systemtests:develop
2018-04-01 13:31:04 +00:00
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
2018-09-16 00:50:49 +00:00
- npm run test
2018-04-01 13:31:04 +00:00
- name: system-tests-mysql
depends_on: [ javascript-tests ]
image: joomlaprojects/docker-systemtests:latest
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" mysql
- name: system-tests-postgres
depends_on: [ system-tests-mysql ]
image: joomlaprojects/docker-systemtests:latest
commands:
- bash tests/Codeception/drone-system-run.sh "$(pwd)" postgres
- name: artifacts-system-tests
image: cschlosser/drone-ftps
depends_on: [ system-tests-postgres ]
environment:
FTP_USERNAME:
from_secret: ftpusername
FTP_PASSWORD:
from_secret: ftppassword
PLUGIN_HOSTNAME: ci.joomla.org:21
PLUGIN_SRC_DIR: /tests/Codeception/_output/
PLUGIN_DEST_DIR: /artifacts
PLUGIN_SECURE: false
PLUGIN_EXCLUDE: ^\.git/$
commands:
- export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST_$DRONE_BUILD_NUMBER/system-tests
- echo https://ci.joomla.org:444$PLUGIN_DEST_DIR
- /bin/upload.sh
when:
status:
- failure
- name: api-tests
depends_on: [ system-tests-postgres ]
2019-03-07 18:16:06 +00:00
image: joomlaprojects/docker-systemtests:latest
commands:
- bash tests/Codeception/drone-api-run.sh "$(pwd)"
2019-03-07 18:16:06 +00:00
- name: analysis4x
image: rips/rips-cli:1.2.1
depends_on: [ api-tests ]
2018-09-05 08:28:45 +00:00
when:
repo:
- joomla/joomla-cms
branch:
- 4.0-dev
2018-09-05 08:28:45 +00:00
commands:
- export RIPS_BASE_URI='https://api.rips.joomla.org'
- rips-cli rips:scan:start -a 3 -t 1 -R -k -p $(pwd) -t 1 -T $DRONE_REPO_NAMESPACE-$DRONE_BRANCH || { echo "Please contact the security team at security@joomla.org"; exit 1; }
environment:
RIPS_USERNAME:
from_secret: RIPS_USERNAME
RIPS_PASSWORD:
from_secret: RIPS_PASSWORD
2018-09-05 08:28:45 +00:00
2018-09-10 17:28:44 +00:00
branches:
exclude: [ l10n_* ]
volumes:
- name: cache
host:
path: /tmp/cache
services:
- name: mysql
image: mysql:5.7
environment:
MYSQL_USER: joomla_ut
MYSQL_PASSWORD: joomla_ut
MYSQL_ROOT_PASSWORD: joomla_ut
2018-04-05 05:53:49 +00:00
MYSQL_DATABASE: test_joomla
- name: memcached
image: memcached:alpine
- name: redis
image: redis:alpine
2017-02-12 10:40:56 +00:00
- name: postgres
image: postgres:9-alpine
ports:
- 5432
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: joomla_ut
POSTGRES_DB: test_joomla
---
kind: signature
hmac: 86217ec95729a624ef4b945a324e20450fa198903af38684eec1acda33f4d1e9
...