3 - PHP_MAJOR_VERSION: 7.3
5 - PHP_MAJOR_VERSION: 7.4
7 - PHP_MAJOR_VERSION: 8.0
9 - PHP_MAJOR_VERSION: 8.1
11 - PHP_MAJOR_VERSION: 8.2
14 # This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...)
20 image: php:${PHP_MAJOR_VERSION}
23 - find . -name \*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l
25 image: meltwater/drone-cache:dev
29 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
30 archive_format: "gzip"
34 - /tmp/drone-cache:/tmp/cache
36 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
38 - export COMPOSER_HOME=.composer
39 - ./bin/composer.phar validate
40 - ./bin/composer.phar install --prefer-dist
42 - /etc/hosts:/etc/hosts
44 image: meltwater/drone-cache:dev
48 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
49 archive_format: "gzip"
53 - /tmp/drone-cache:/tmp/cache
55 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
59 MYSQL_DATABASE: "test"
60 MYSQL_PASSWORD: "test"
63 MEMCACHED_HOST: "memcached"
64 MEMCACHE_HOST: "memcached"
66 - cp config/local-sample.config.php config/local.config.php
67 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
68 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
69 - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica" ]; then
71 export XDEBUG_MODE=coverage;
72 phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml;
74 phpunit --configuration tests/phpunit.xml;
77 image: friendicaci/codecov
80 PHP_MAJOR_VERSION: 7.4
85 - codecov -R '.' -Z -f 'clover.xml'
87 - source: codecov-token
94 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
95 MYSQL_DATABASE: "test"
96 MYSQL_PASSWORD: "test"