mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-11-13 16:26:30 +00:00
140 lines
3.9 KiB
YAML
140 lines
3.9 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
steps:
|
|
- name: composer
|
|
image: joomlaprojects/docker-images:php8.2
|
|
volumes:
|
|
- name: composer-cache
|
|
path: /tmp/composer-cache
|
|
commands:
|
|
- composer install --no-progress --no-suggest
|
|
|
|
- name: npm
|
|
image: node:16-bullseye-slim
|
|
depends_on: [ composer ]
|
|
volumes:
|
|
- name: npm-cache
|
|
path: /tmp/npm-cache
|
|
environment:
|
|
npm_config_cache: /tmp/npm-cache
|
|
commands:
|
|
- npm i --unsafe-perm
|
|
|
|
- name: prepare_system_tests
|
|
depends_on:
|
|
- npm
|
|
image: joomlaprojects/docker-images:systemtests
|
|
volumes:
|
|
- name: cypress-cache
|
|
path: /root/.cache/Cypress
|
|
commands:
|
|
- mv cypress.config.dist.js cypress.config.js
|
|
- npx cypress install
|
|
- npx cypress verify
|
|
- vendor/bin/robo build
|
|
- wget -o joomla.zip https://joomla.org/latest
|
|
|
|
- name: phpmin-system-mysql
|
|
depends_on:
|
|
- prepare_system_tests
|
|
image: joomlaprojects/docker-images:cypress
|
|
volumes:
|
|
- name: cypress-cache
|
|
path: /root/.cache/Cypress
|
|
commands:
|
|
- mkdir /tests/www/mysql/
|
|
- cp joomla.zip /tests/www/mysql/
|
|
- cd /tests/www/mysql/
|
|
- unzip joomla.zip
|
|
- apache2ctl -D FOREGROUND &
|
|
- chmod +rwx /root
|
|
- php installation/joomla.php install --verbose --site-name="Joomla CMS test" --admin-email=admin@example.org --admin-username=ci-admin --admin-user="jane doe" --admin-password=joomla-17082005 --db-type=mysqli --db-host=mysql --db-name=test_joomla --db-pass=joomla_ut --db-user=root --db-encryption=0 --db-prefix=mysql_
|
|
- npx cypress run --browser=firefox --e2e --config baseUrl=http://localhost/mysql,screenshotsFolder=/drone/src/tests/cypress/output/screenshots
|
|
|
|
- name: weblinks-codeception-tests
|
|
image: joomlaprojects/docker-images:systemtests
|
|
commands:
|
|
- pwd
|
|
- composer install
|
|
- chmod a+x .drone/build.sh
|
|
- ./.drone/build.sh
|
|
- apache2ctl start
|
|
- service mysql start
|
|
- cd /tests/www
|
|
- export DISPLAY=:0
|
|
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
|
|
- sleep 3
|
|
- fluxbox > /dev/null 2>&1 &
|
|
- vendor/bin/robo run:tests
|
|
|
|
- name: artifacts-codeception-tests
|
|
image: cschlosser/drone-ftps
|
|
depends_on: [ weblinks-codeception-tests ]
|
|
environment:
|
|
FTP_USERNAME:
|
|
from_secret: ftpusername
|
|
FTP_PASSWORD:
|
|
from_secret: ftppassword
|
|
PLUGIN_HOSTNAME: artifacts.joomla.org:21
|
|
PLUGIN_SRC_DIR: /tests/_output
|
|
PLUGIN_DEST_DIR: /
|
|
PLUGIN_SECURE: false
|
|
PLUGIN_EXCLUDE: ^\.git/$
|
|
commands:
|
|
- ls -l /drone/src/tests/_output
|
|
- export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
|
|
- echo https://artifacts.joomla.org/drone$PLUGIN_DEST_DIR
|
|
- /bin/upload.sh
|
|
when:
|
|
status:
|
|
- failure
|
|
|
|
volumes:
|
|
- name: weblinks_cache
|
|
host:
|
|
path: /tmp/weblinks_cache
|
|
- name: composer-cache
|
|
host:
|
|
path: /tmp/composer-cache
|
|
- name: cypress-cache
|
|
host:
|
|
path: /tmp/cypress-cache
|
|
- name: npm-cache
|
|
host:
|
|
path: /tmp/npm-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: mysql8
|
|
image: mysql:8
|
|
command: ["--default-authentication-plugin=mysql_native_password"]
|
|
environment:
|
|
MYSQL_USER: joomla_ut
|
|
MYSQL_PASSWORD: joomla_ut
|
|
MYSQL_ROOT_PASSWORD: joomla_ut
|
|
MYSQL_DATABASE: test_joomla
|
|
|
|
- name: postgres
|
|
image: postgres:11-alpine
|
|
ports:
|
|
- 5432
|
|
environment:
|
|
POSTGRES_USER: root
|
|
POSTGRES_PASSWORD: joomla_ut
|
|
POSTGRES_DB: test_joomla
|
|
|
|
---
|
|
kind: signature
|
|
hmac: bcc028d5d9601f1f3355862f17dd2434ba86f47634f0737877db534e49c8265b
|
|
|
|
...
|