3 - PHP_MAJOR_VERSION: 7.4
5 - PHP_MAJOR_VERSION: 8.0
7 - PHP_MAJOR_VERSION: 8.1
9 - PHP_MAJOR_VERSION: 8.2
12 # This forces PHP Unit executions at the "opensocial" labeled location (because of much more power...)
22 - git clone https://github.com/friendica/friendica.git .
23 - git checkout $CI_COMMIT_BRANCH
24 clone_friendica_addon:
27 - git config --global user.email "no-reply@friendi.ca"
28 - git config --global user.name "Friendica"
29 - git clone $CI_REPO_LINK addon
31 - git checkout $CI_COMMIT_BRANCH
32 - git fetch origin $CI_COMMIT_REF
33 - git merge $CI_COMMIT_SHA
35 image: meltwater/drone-cache:dev
39 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
40 archive_format: "gzip"
44 - /tmp/drone-cache:/tmp/cache
46 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
48 - export COMPOSER_HOME=.composer
49 - ./bin/composer.phar validate
50 - ./bin/composer.phar install --prefer-dist
52 - /etc/hosts:/etc/hosts
54 image: meltwater/drone-cache:dev
58 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
59 archive_format: "gzip"
63 - /tmp/drone-cache:/tmp/cache
65 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
69 MYSQL_DATABASE: "test"
70 MYSQL_PASSWORD: "test"
73 MEMCACHED_HOST: "memcached"
74 MEMCACHE_HOST: "memcached"
76 - cp config/local-sample.config.php config/local.config.php
77 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
78 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
79 - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then
81 export XDEBUG_MODE=coverage;
82 phpunit --configuration tests/phpunit-addons.xml --coverage-clover clover.xml;
84 phpunit --configuration tests/phpunit-addons.xml;
87 image: friendicaci/codecov
90 PHP_MAJOR_VERSION: 7.4
93 - friendica/friendica-addons
95 - codecov -R '.' -Z -f 'clover.xml'
97 - source: codecov-token
102 image: mariadb:latest
104 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
105 MYSQL_DATABASE: "test"
106 MYSQL_PASSWORD: "test"