]> git.mxchange.org Git - friendica.git/blob - .drone.yml
Fix reshare of Diaspora posts only with pictures
[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: Composer install
71     image: friendicaci/php7.4:php7.4.18
72     commands:
73       - composer validate
74       - composer install --prefer-dist
75   - name: Test Friendica
76     image: friendicaci/php7.3:php7.3.28
77     environment:
78       MYSQL_HOST: "mariadb"
79       MYSQL_PORT: 3306
80       MYSQL_DATABASE: "test"
81       MYSQL_PASSWORD: "test"
82       MYSQL_USER: "test"
83       REDIS_HOST: "redis"
84       MEMCACHED_HOST: "memcached"
85       MEMCACHE_HOST: "memcached"
86     commands:
87       - cp config/local-sample.config.php config/local.config.php
88       - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
89       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
90       - phpunit --configuration tests/phpunit.xml
91
92 services:
93   - name: mariadb
94     image: mariadb:latest
95     environment:
96       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
97       MYSQL_DATABASE: "test"
98       MYSQL_PASSWORD: "test"
99       MYSQL_USER: "test"
100     tmpfs:
101       - /var/lib/mysql
102
103   - name: memcached
104     image: memcached
105
106   - name: redis
107     image: redis
108 ---
109 kind: pipeline
110 type: docker
111 name: php7.4-mariadb
112
113 steps:
114   - name: Composer install
115     image: friendicaci/php7.4:php7.4.18
116     commands:
117       - composer validate
118       - composer install --prefer-dist
119   - name: Test Friendica
120     image: friendicaci/php7.4:php7.4.18
121     environment:
122       MYSQL_HOST: "mariadb"
123       MYSQL_PORT: 3306
124       MYSQL_DATABASE: "test"
125       MYSQL_PASSWORD: "test"
126       MYSQL_USER: "test"
127       REDIS_HOST: "redis"
128       MEMCACHED_HOST: "memcached"
129       MEMCACHE_HOST: "memcached"
130       XDEBUG_MODE: "coverage"
131     commands:
132       - phpenmod xdebug
133       - cp config/local-sample.config.php config/local.config.php
134       - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
135       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
136       - phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
137   - name: Codecov
138     image: plugins/codecov
139     when:
140       repo:
141         - friendica/friendica
142     settings:
143       token:
144         from_secret: codecov-token
145       files:
146         - clover.xml
147
148 services:
149   - name: mariadb
150     image: mariadb:latest
151     environment:
152       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
153       MYSQL_DATABASE: "test"
154       MYSQL_PASSWORD: "test"
155       MYSQL_USER: "test"
156     tmpfs:
157       - /var/lib/mysql
158
159   - name: memcached
160     image: memcached
161
162   - name: redis
163     image: redis
164 ---
165 kind: pipeline
166 type: docker
167 name: php8.0-mariadb
168
169 steps:
170   - name: Composer install
171     image: friendicaci/php7.4:php7.4.18
172     commands:
173       - composer validate
174       - composer install --prefer-dist
175   - name: Test Friendica
176     image: friendicaci/php8.0:php8.0.5
177     environment:
178       MYSQL_HOST: "mariadb"
179       MYSQL_PORT: 3306
180       MYSQL_DATABASE: "test"
181       MYSQL_PASSWORD: "test"
182       MYSQL_USER: "test"
183       REDIS_HOST: "redis"
184       MEMCACHED_HOST: "memcached"
185       MEMCACHE_HOST: "memcached"
186     commands:
187       - cp config/local-sample.config.php config/local.config.php
188       - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
189       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
190       - phpunit --configuration tests/phpunit.xml
191
192 services:
193   - name: mariadb
194     image: mariadb:latest
195     environment:
196       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
197       MYSQL_DATABASE: "test"
198       MYSQL_PASSWORD: "test"
199       MYSQL_USER: "test"
200     tmpfs:
201       - /var/lib/mysql
202
203   - name: memcached
204     image: memcached
205
206   - name: redis
207     image: redis