]> git.mxchange.org Git - friendica.git/blob - .drone.yml
c6f397fd038267c29266e8aa1538ccb6573ff7e5
[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: "wrong"
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       - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
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       XDEBUG_MODE: "coverage"
123     commands:
124       - phpenmod xdebug
125       - composer validate
126       - composer install --prefer-dist
127       - cp config/local-sample.config.php config/local.config.php
128       - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
129       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
130       - phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
131   - name: Codecov
132     image: plugins/codecov
133     when:
134       repo:
135         - friendica/friendica
136     settings:
137       token:
138         from_secret: codecov-token
139       files:
140         - clover.xml
141
142 services:
143   - name: mariadb
144     image: mariadb:latest
145     environment:
146       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
147       MYSQL_DATABASE: "test"
148       MYSQL_PASSWORD: "test"
149       MYSQL_USER: "test"
150     tmpfs:
151       - /var/lib/mysql
152
153   - name: memcached
154     image: memcached
155
156   - name: redis
157     image: redis
158 ---
159 kind: pipeline
160 type: docker
161 name: php8.0-mariadb
162
163 steps:
164   - name: Test Friendica
165     image: friendicaci/php8.0:php8.0.5
166     environment:
167       MYSQL_HOST: "mariadb"
168       MYSQL_PORT: 3306
169       MYSQL_DATABASE: "test"
170       MYSQL_PASSWORD: "test"
171       MYSQL_USER: "test"
172       REDIS_HOST: "redis"
173       MEMCACHED_HOST: "memcached"
174       MEMCACHE_HOST: "memcached"
175     commands:
176       - composer validate
177       - composer install --prefer-dist
178       - cp config/local-sample.config.php config/local.config.php
179       - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
180       - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
181       - phpunit --configuration tests/phpunit.xml
182
183 services:
184   - name: mariadb
185     image: mariadb:latest
186     environment:
187       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
188       MYSQL_DATABASE: "test"
189       MYSQL_PASSWORD: "test"
190       MYSQL_USER: "test"
191     tmpfs:
192       - /var/lib/mysql
193
194   - name: memcached
195     image: memcached
196
197   - name: redis
198     image: redis