]> git.mxchange.org Git - friendica.git/blob - .drone.yml
8eed7af6b4cf6790fb296dbaca0bb709c78599f9
[friendica.git] / .drone.yml
1 kind: pipeline
2 type: docker
3 name: Check messages.po
4
5 steps:
6   - name: Run default Xgettext
7     image: friendicaci/transifex
8     commands:
9       - ./bin/run_xgettext.sh
10
11   - name: Check default
12     image: friendicaci/transifex
13     commands:
14       - /check-messages.sh
15 ---
16 kind: pipeline
17 type: docker
18 name: php7.3-lint
19
20 steps:
21   - name: Test
22     image: php:7.3
23     commands:
24       - ./bin/composer.phar run lint
25 ---
26 kind: pipeline
27 type: docker
28 name: php7.4-lint
29
30 steps:
31   - name: Test
32     image: php:7.4
33     commands:
34       - ./bin/composer.phar run lint
35 ---
36 kind: pipeline
37 type: docker
38 name: php8.0-lint
39
40 steps:
41   - name: Test
42     image: php:8.0
43     commands:
44       - ./bin/composer.phar run lint
45 ---
46 kind: pipeline
47 type: docker
48 name: php-cs check
49
50 trigger:
51   event:
52     - pull_request
53
54 steps:
55   - name: Install dependencies
56     image: composer
57     commands:
58       - ./bin/composer.phar run cs:install
59   - name: Run coding standards check
60     image: friendicaci/php-cs
61     commands:
62       - export CHANGED_FILES="$(git diff --name-status ${DRONE_COMMIT_BEFORE}..${DRONE_COMMIT_AFTER} | grep ^A | cut -f2)"
63       - /check-php-cs.sh
64 ---
65 kind: pipeline
66 type: docker
67 name: php7.3-mariadb
68
69 steps:
70   - name: Test Friendica
71     image: friendicaci/php7.3:php7.3.28
72     environment:
73       MYSQL_HOST: "mariadb"
74       MYSQL_PORT: 3306
75       MYSQL_DATABASE: "test"
76       MYSQL_PASSWORD: "test"
77       MYSQL_USER: "test"
78       REDIS_HOST: "redis"
79       MEMCACHED_HOST: "memcached"
80       MEMCACHE_HOST: "memcached"
81     commands:
82       - composer validate
83       - composer install --prefer-dist
84       - cp config/local-sample.config.php config/local.config.php
85       - while ! mysqladmin ping -h$MYSQL_HOST -P$MYSQL_PORT --silent; do sleep 1; done
86       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
87       - phpunit --configuration tests/phpunit.xml
88
89 services:
90   - name: mariadb
91     image: mariadb:latest
92     environment:
93       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
94       MYSQL_DATABASE: "test"
95       MYSQL_PASSWORD: "test"
96       MYSQL_USER: "test"
97     tmpfs:
98       - /var/lib/mysql
99
100   - name: memcached
101     image: memcached
102
103   - name: redis
104     image: redis
105 ---
106 kind: pipeline
107 type: docker
108 name: php7.4-mariadb
109
110 steps:
111   - name: Test Friendica
112     image: friendicaci/php7.4:php7.4.18
113     environment:
114       MYSQL_HOST: "mariadb"
115       MYSQL_PORT: 3306
116       MYSQL_DATABASE: "test"
117       MYSQL_PASSWORD: "test"
118       MYSQL_USER: "test"
119       REDIS_HOST: "redis"
120       MEMCACHED_HOST: "memcached"
121       MEMCACHE_HOST: "memcached"
122     commands:
123       - phpenmod xdebug
124       - composer validate
125       - composer install --prefer-dist
126       - cp config/local-sample.config.php config/local.config.php
127       - while ! mysqladmin ping -h$MYSQL_HOST -P$MYSQL_PORT --silent; do sleep 1; done
128       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
129       - phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
130   - name: Codecov
131     image: plugins/codecov
132     when:
133       repo:
134         - friendica/friendica
135     settings:
136       token:
137         from_secret: codecov-token
138       files:
139         - clover.xml
140
141 services:
142   - name: mariadb
143     image: mariadb:latest
144     environment:
145       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
146       MYSQL_DATABASE: "test"
147       MYSQL_PASSWORD: "test"
148       MYSQL_USER: "test"
149     tmpfs:
150       - /var/lib/mysql
151
152   - name: memcached
153     image: memcached
154
155   - name: redis
156     image: redis
157 ---
158 kind: pipeline
159 type: docker
160 name: php8.0-mariadb
161
162 steps:
163   - name: Test Friendica
164     image: friendicaci/php8.0:php8.0.5
165     environment:
166       MYSQL_HOST: "mariadb"
167       MYSQL_PORT: 3306
168       MYSQL_DATABASE: "test"
169       MYSQL_PASSWORD: "test"
170       MYSQL_USER: "test"
171       REDIS_HOST: "redis"
172       MEMCACHED_HOST: "memcached"
173       MEMCACHE_HOST: "memcached"
174     commands:
175       - composer validate
176       - composer install --prefer-dist
177       - cp config/local-sample.config.php config/local.config.php
178       - while ! mysqladmin ping -h$MYSQL_HOST -P$MYSQL_PORT --silent; do sleep 1; done
179       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
180       - phpunit --configuration tests/phpunit.xml
181
182 services:
183   - name: mariadb
184     image: mariadb:latest
185     environment:
186       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
187       MYSQL_DATABASE: "test"
188       MYSQL_PASSWORD: "test"
189       MYSQL_USER: "test"
190     tmpfs:
191       - /var/lib/mysql
192
193   - name: memcached
194     image: memcached
195
196   - name: redis
197     image: redis