]> git.mxchange.org Git - friendica.git/blob - .woodpecker/.phpunit.yml
Fixed wrong reference to user.expire in Model\User::getActorName
[friendica.git] / .woodpecker / .phpunit.yml
1 matrix:
2   include:
3     - PHP_MAJOR_VERSION: 7.3
4       PHP_VERSION: 7.3.33
5     - PHP_MAJOR_VERSION: 7.4
6       PHP_VERSION: 7.4.33
7     - PHP_MAJOR_VERSION: 8.0
8       PHP_VERSION: 8.0.25
9 #    - PHP_MAJOR_VERSION: 8.1
10 #      PHP_VERSION: 8.1.12
11
12 pipeline:
13   php-lint:
14     image: php:${PHP_MAJOR_VERSION}
15     group: lint
16     commands:
17       - ./bin/composer.phar run lint
18   restore_cache:
19     image: meltwater/drone-cache:dev
20     settings:
21       backend: "filesystem"
22       restore: true
23       cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
24       archive_format: "gzip"
25       mount:
26         - '.composer'
27     volumes:
28       - /tmp/drone-cache:/tmp/cache
29   composer_install:
30     image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
31     commands:
32       - export COMPOSER_HOME=.composer
33       - ./bin/composer.phar validate
34       - ./bin/composer.phar install --prefer-dist
35     volumes:
36       - /etc/hosts:/etc/hosts
37   rebuild_cache:
38     image: meltwater/drone-cache:dev
39     settings:
40       backend: "filesystem"
41       rebuild: true
42       cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}"
43       archive_format: "gzip"
44       mount:
45         - '.composer'
46     volumes:
47       - /tmp/drone-cache:/tmp/cache
48   test:
49     image: friendicaci/php${PHP_MAJOR_VERSION}:php${PHP_VERSION}
50     environment:
51       MYSQL_HOST: "mariadb"
52       MYSQL_PORT: "3306"
53       MYSQL_DATABASE: "test"
54       MYSQL_PASSWORD: "test"
55       MYSQL_USER: "test"
56       REDIS_HOST: "redis"
57       MEMCACHED_HOST: "memcached"
58       MEMCACHE_HOST: "memcached"
59     commands:
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
64           phpenmod xdebug;
65           export XDEBUG_MODE=coverage;
66           phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml;
67         else
68           phpunit --configuration tests/phpunit.xml;
69         fi
70
71   codecov:
72     image: plugins/codecov
73     when:
74       matrix:
75         PHP_MAJOR_VERSION: 7.4
76         PHP_VERSION: 7.4.18
77       repo:
78         - friendica/friendica
79     settings:
80       token:
81         from_secret: codecov-token
82       files:
83         - clover.xml
84
85 services:
86   mariadb:
87     image: mariadb:latest
88     environment:
89       MYSQL_ALLOW_EMPTY_PASSWORD: "true"
90       MYSQL_DATABASE: "test"
91       MYSQL_PASSWORD: "test"
92       MYSQL_USER: "test"
93
94   memcached:
95     image: memcached
96
97   redis:
98     image: redis