3 - PHP_MAJOR_VERSION: 7.3
5 - PHP_MAJOR_VERSION: 7.4
7 - PHP_MAJOR_VERSION: 8.0
9 - PHP_MAJOR_VERSION: 8.1
12 # This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...)
18 image: php:${PHP_MAJOR_VERSION}
21 - ./bin/composer.phar run lint
23 image: meltwater/drone-cache:dev
27 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
28 archive_format: "gzip"
32 - /tmp/drone-cache:/tmp/cache
34 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
36 - export COMPOSER_HOME=.composer
37 - ./bin/composer.phar validate
38 - ./bin/composer.phar install --prefer-dist
40 - /etc/hosts:/etc/hosts
42 image: meltwater/drone-cache:dev
46 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
47 archive_format: "gzip"
51 - /tmp/drone-cache:/tmp/cache
53 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
57 MYSQL_DATABASE: "test"
58 MYSQL_PASSWORD: "test"
61 MEMCACHED_HOST: "memcached"
62 MEMCACHE_HOST: "memcached"
64 - cp config/local-sample.config.php config/local.config.php
65 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
66 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
67 - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica" ]; then
69 export XDEBUG_MODE=coverage;
70 phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml;
72 phpunit --configuration tests/phpunit.xml;
76 image: plugins/codecov
79 PHP_MAJOR_VERSION: 7.4
85 from_secret: codecov-token
93 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
94 MYSQL_DATABASE: "test"
95 MYSQL_PASSWORD: "test"