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...)
24 - git clone https://github.com/friendica/friendica.git .
25 - git checkout $CI_COMMIT_BRANCH
26 clone_friendica_addon:
29 - git config --global user.email "no-reply@friendi.ca"
30 - git config --global user.name "Friendica"
31 - git clone $CI_REPO_LINK addon
33 - git checkout $CI_COMMIT_BRANCH
34 - git fetch origin $CI_COMMIT_REF
35 - git merge $CI_COMMIT_SHA
37 image: meltwater/drone-cache:dev
41 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
42 archive_format: "gzip"
46 - /tmp/drone-cache:/tmp/cache
48 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
50 - export COMPOSER_HOME=.composer
51 - ./bin/composer.phar validate
52 - ./bin/composer.phar install --prefer-dist
54 - /etc/hosts:/etc/hosts
56 image: meltwater/drone-cache:dev
60 cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
61 archive_format: "gzip"
65 - /tmp/drone-cache:/tmp/cache
67 image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
71 MYSQL_DATABASE: "test"
72 MYSQL_PASSWORD: "test"
75 MEMCACHED_HOST: "memcached"
76 MEMCACHE_HOST: "memcached"
78 - cp config/local-sample.config.php config/local.config.php
79 - if ! bin/wait-for-connection $MYSQL_HOST $MYSQL_PORT 300; then echo "[ERROR] Waited 300 seconds, no response" >&2; exit 1; fi
80 - mysql -h$MYSQL_HOST -P$MYSQL_PORT -p$MYSQL_PASSWORD -u$MYSQL_USER $MYSQL_DATABASE < database.sql
81 - if [ "${PHP_MAJOR_VERSION}" = "7.4" -a "${CI_REPO}" = "friendica/friendica-addons" ]; then
83 export XDEBUG_MODE=coverage;
84 phpunit --configuration tests/phpunit-addons.xml --coverage-clover clover.xml;
86 phpunit --configuration tests/phpunit-addons.xml;
89 image: friendicaci/codecov
92 PHP_MAJOR_VERSION: 7.4
95 - friendica/friendica-addons
97 - codecov -R '.' -Z -f 'clover.xml'
99 - source: codecov-token
100 target: codecov_token
104 image: mariadb:latest
106 MYSQL_ALLOW_EMPTY_PASSWORD: "true"
107 MYSQL_DATABASE: "test"
108 MYSQL_PASSWORD: "test"