3 - PHP_MAJOR_VERSION: 7.3
5 - PHP_MAJOR_VERSION: 7.4
7 - PHP_MAJOR_VERSION: 8.0
9 # - PHP_MAJOR_VERSION: 8.1
14 image: php:${PHP_MAJOR_VERSION}
17 - ./bin/composer.phar run lint
19 image: meltwater/drone-cache:dev
23 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
24 archive_format: "gzip"
28 - /tmp/drone-cache:/tmp/cache
30 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
32 - export COMPOSER_HOME=.composer
33 - ./bin/composer.phar validate
34 - ./bin/composer.phar install --prefer-dist
36 - /etc/hosts:/etc/hosts
38 image: meltwater/drone-cache:dev
42 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
43 archive_format: "gzip"
47 - /tmp/drone-cache:/tmp/cache
49 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
53 MYSQL_DATABASE: "test"
54 MYSQL_PASSWORD: "test"
57 MEMCACHED_HOST: "memcached"
58 MEMCACHE_HOST: "memcached"
60 - cp config/local-sample.config.php config/local.config.php
61 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
62 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
63 - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica" ]; then
65 export XDEBUG_MODE=coverage;
66 phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml;
68 phpunit --configuration tests/phpunit.xml;
72 image: plugins/codecov
75 PHP_MAJOR_VERSION: 7.4
81 from_secret: codecov-token
89 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
90 MYSQL_DATABASE: "test"
91 MYSQL_PASSWORD: "test"