3 - PHP_MAJOR_VERSION: 7.3
5 - PHP_MAJOR_VERSION: 7.4
7 - PHP_MAJOR_VERSION: 8.0
12 image: php:${PHP_MAJOR_VERSION}
15 - ./bin/composer.phar run lint
17 image: meltwater/drone-cache:dev
21 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
22 archive_format: "gzip"
26 - /tmp/drone-cache:/tmp/cache
28 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
30 - export COMPOSER_HOME=.composer
31 - ./bin/composer.phar validate
32 - ./bin/composer.phar install --prefer-dist
34 - /etc/hosts:/etc/hosts
36 image: meltwater/drone-cache:dev
40 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
41 archive_format: "gzip"
45 - /tmp/drone-cache:/tmp/cache
47 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
51 MYSQL_DATABASE: "test"
52 MYSQL_PASSWORD: "test"
55 MEMCACHED_HOST: "memcached"
56 MEMCACHE_HOST: "memcached"
58 - cp config/local-sample.config.php config/local.config.php
59 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
60 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
61 - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica" ]; then
63 export XDEBUG_MODE=coverage;
64 phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml;
66 phpunit --configuration tests/phpunit.xml;
70 image: plugins/codecov
73 PHP_MAJOR_VERSION: 7.4
79 from_secret: codecov-token
87 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
88 MYSQL_DATABASE: "test"
89 MYSQL_PASSWORD: "test"