32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-11-13 08:16:31 +00:00
weblinks/.drone.yml

140 lines
3.9 KiB
YAML
Raw Normal View History

---
kind: pipeline
name: default
steps:
2023-05-15 20:28:55 +00:00
- 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:
2021-07-19 12:32:15 +00:00
- 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
2021-07-19 12:19:14 +00:00
- name: artifacts-codeception-tests
image: cschlosser/drone-ftps
2021-07-19 12:19:56 +00:00
depends_on: [ weblinks-codeception-tests ]
2021-07-19 12:19:14 +00:00
environment:
FTP_USERNAME:
from_secret: ftpusername
FTP_PASSWORD:
from_secret: ftppassword
2021-07-19 12:21:40 +00:00
PLUGIN_HOSTNAME: artifacts.joomla.org:21
2021-07-19 13:15:37 +00:00
PLUGIN_SRC_DIR: /tests/_output
2021-07-19 13:23:16 +00:00
PLUGIN_DEST_DIR: /
2021-07-19 12:19:14 +00:00
PLUGIN_SECURE: false
PLUGIN_EXCLUDE: ^\.git/$
commands:
2021-07-19 12:33:35 +00:00
- ls -l /drone/src/tests/_output
2021-07-19 13:21:37 +00:00
- export PLUGIN_DEST_DIR=$PLUGIN_DEST_DIR/$DRONE_REPO/$DRONE_BRANCH/$DRONE_PULL_REQUEST/system-tests/$DRONE_BUILD_NUMBER
2021-07-19 13:23:16 +00:00
- echo https://artifacts.joomla.org/drone$PLUGIN_DEST_DIR
2021-07-19 12:19:14 +00:00
- /bin/upload.sh
when:
status:
- failure
volumes:
- name: weblinks_cache
host:
path: /tmp/weblinks_cache
2023-05-15 20:28:55 +00:00
- 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
2021-07-19 13:23:16 +00:00
hmac: bcc028d5d9601f1f3355862f17dd2434ba86f47634f0737877db534e49c8265b
...