mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-06-24 22:39:31 +00:00
153 lines
4.2 KiB
YAML
153 lines
4.2 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
clone:
|
|
depth: 42
|
|
|
|
steps:
|
|
- name: phpcs
|
|
image: joomlaprojects/docker-phpcs
|
|
commands:
|
|
- echo $(date)
|
|
- /root/.composer/vendor/bin/phpcs --report=full --encoding=utf-8 --extensions=php -p --standard=build/phpcs/Joomla .
|
|
- echo $(date)
|
|
|
|
- name: restore-cache
|
|
image: drillster/drone-volume-cache
|
|
depends_on: [ phpcs ]
|
|
settings:
|
|
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
|
|
|
|
- name: prepare
|
|
image: joomlaprojects/docker-tools:develop
|
|
depends_on: [ restore-cache ]
|
|
commands:
|
|
- composer install --no-progress --no-suggest
|
|
# needed for system testing
|
|
- composer update joomla/test-system --no-progress --no-suggest
|
|
- composer update joomla/test-api --no-progress --no-suggest
|
|
- composer update joomla-projects/selenium-server-standalone --no-progress --no-suggest
|
|
- composer update joomla-projects/joomla-browser --no-progress --no-suggest
|
|
- npm install --unsafe-perm
|
|
|
|
- name: rebuild-cache
|
|
image: drillster/drone-volume-cache
|
|
depends_on: [ prepare ]
|
|
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
|
|
|
|
- name: php70-unit
|
|
depends_on: [ rebuild-cache ]
|
|
image: joomlaprojects/docker-php70:develop
|
|
commands:
|
|
- ./libraries/vendor/bin/phpunit
|
|
|
|
- name: php71-unit
|
|
depends_on: [ rebuild-cache ]
|
|
image: joomlaprojects/docker-php71:develop
|
|
commands:
|
|
- ./libraries/vendor/bin/phpunit
|
|
|
|
- name: php72-unit
|
|
depends_on: [ rebuild-cache ]
|
|
image: joomlaprojects/docker-php72:develop
|
|
commands:
|
|
- ./libraries/vendor/bin/phpunit
|
|
|
|
- name: javascript-cs
|
|
depends_on: [ rebuild-cache ]
|
|
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: [ rebuild-cache ]
|
|
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 test
|
|
|
|
- name: system-tests
|
|
depends_on: [ javascript-tests ]
|
|
image: joomlaprojects/docker-systemtests:develop
|
|
commands:
|
|
- bash libraries/vendor/joomla/test-system/src/drone-run.sh "$(pwd)"
|
|
|
|
- name: api-tests
|
|
depends_on: [ system-tests ]
|
|
image: joomlaprojects/docker-systemtests:latest
|
|
commands:
|
|
- bash libraries/vendor/joomla/test-api/drone-run.sh "$(pwd)"
|
|
|
|
- name: analysis4x
|
|
image: rips/rips-cli:1.2.1
|
|
depends_on: [ api-tests ]
|
|
when:
|
|
branch: 4.0-dev
|
|
commands:
|
|
- export RIPS_BASE_URI='https://api.rips.joomla.org'
|
|
- if [ $DRONE_REPO_NAMESPACE != 'joomla' ]; then echo "The analysis check only run on the main repos"; exit 0; fi
|
|
- 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
|
|
|
|
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
|
|
MYSQL_DATABASE: test_joomla
|
|
|
|
- name: memcached
|
|
image: memcached:alpine
|
|
|
|
- name: redis
|
|
image: redis:alpine
|
|
|
|
- name: postgres
|
|
image: postgres
|
|
|
|
---
|
|
kind: signature
|
|
hmac: 820e2021962202c01514b4ffe5eb893640c83fb5542345a70c4ca01e4ccfd43c
|
|
|
|
...
|