Skip to content

Commit a1d03fa

Browse files
authored
Merge pull request #42 from Hackwar/foundation
Update CI setup
2 parents 7e1440f + 88fc367 commit a1d03fa

File tree

18 files changed

+3561
-3373
lines changed

18 files changed

+3561
-3373
lines changed

.drone.yml

Lines changed: 82 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,94 @@ steps:
2323
- ./vendor/bin/phpcs --extensions=php -p --standard=ruleset.xml src/
2424
- echo $(date)
2525

26+
- name: npm
27+
image: node:20-bullseye-slim
28+
depends_on: [ phpcs ]
29+
volumes:
30+
- name: npm-cache
31+
path: /tmp/npm-cache
32+
environment:
33+
npm_config_cache: /tmp/npm-cache
34+
commands:
35+
- npm i --unsafe-perm
36+
37+
- name: prepare_tests
38+
depends_on: [ npm ]
39+
image: joomlaprojects/docker-images:cypress8.2
40+
volumes:
41+
- name: cypress-cache
42+
path: /root/.cache/Cypress
43+
environment:
44+
CYPRESS_VERIFY_TIMEOUT: 100000
45+
commands:
46+
- mv cypress.config.dist.js cypress.config.js
47+
- npx cypress install
48+
- npx cypress verify
49+
- vendor/bin/robo build
50+
- curl https://joomla.org/latest -L --output joomla.zip
51+
- mkdir joomla
52+
- cp joomla.zip joomla/joomla.zip
53+
- cd joomla
54+
- unzip joomla.zip
55+
56+
- name: phpstan
57+
image: joomlaprojects/docker-images:php8.2
58+
depends_on: [ prepare_tests ]
59+
failure: ignore
60+
commands:
61+
- vendor/bin/phpstan
62+
63+
- name: phpunit
64+
image: joomlaprojects/docker-images:php8.2
65+
depends_on: [ prepare_tests ]
66+
commands:
67+
- vendor/bin/phpunit
68+
69+
- name: phpmin-system-mysql
70+
depends_on: [ prepare_tests ]
71+
image: joomlaprojects/docker-images:cypress8.2
72+
volumes:
73+
- name: cypress-cache
74+
path: /root/.cache/Cypress
75+
commands:
76+
- mkdir /tests/www/mysql/
77+
- cp joomla.zip /tests/www/mysql/joomla.zip
78+
- cp dist/pkg-jed-current.zip /tests/www/mysql/pkg-jed-current.zip
79+
- cd /tests/www/mysql/
80+
- unzip joomla.zip
81+
- apache2ctl -D FOREGROUND &
82+
- chmod +rwx /root
83+
- 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=joomla_ut --db-encryption=0 --db-prefix=mysql_
84+
- php cli/joomla.php config:set debug=true error_reporting=maximum
85+
- php cli/joomla.php extension:install --path=/tests/www/mysql/pkg-jed-current.zip
86+
- chmod -R 777 /tests/www/mysql/
87+
- chown -R www-data /tests/www/mysql/
88+
- cd /drone/src
89+
- npx cypress run --browser=firefox --e2e --env cmsPath=/tests/www/mysql,db_type=mysqli,db_host=mysql,db_name=test_joomla,db_user=joomla_ut,db_password=joomla_ut,db_prefix=mysql_ --config baseUrl=http://localhost/mysql,screenshotsFolder=/drone/src/tests/cypress/output/screenshot
90+
2691
volumes:
2792
- name: composer-cache
2893
host:
2994
path: /tmp/composer-cache
95+
- name: cypress-cache
96+
host:
97+
path: /tmp/cypress-cache
98+
- name: npm-cache
99+
host:
100+
path: /tmp/npm-cache
101+
102+
services:
103+
- name: mysql
104+
image: mysql:8.0
105+
command: ["--default-authentication-plugin=mysql_native_password"]
106+
environment:
107+
MYSQL_USER: joomla_ut
108+
MYSQL_PASSWORD: joomla_ut
109+
MYSQL_ROOT_PASSWORD: joomla_ut
110+
MYSQL_DATABASE: test_joomla
30111

31112
---
32113
kind: signature
33-
hmac: b7403bc713a0865808f4851c7773a3133d531ceac51a933198a6df8124f30367
114+
hmac: 946bc2e0a7065982cbd7cd7a6ea3581c068151e244679a1d89d0ed5dd621abb6
34115

35116
...

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
component/backend/vendor
1313
## JoRobo config file
1414
jorobo.ini
15-
/cc/
15+
/cc/
16+
/joomla/

0 commit comments

Comments
 (0)