2019-05-30 23:51:06 +00:00
|
|
|
.docker_boostrap: &docker_boostrap |
|
|
|
|
[[ ! -e /.dockerenv ]] && exit 0
|
|
|
|
set -xe
|
|
|
|
|
|
|
|
# Install git (the php image doesn't have it) which is required by composer
|
|
|
|
apt-get update -yq
|
2020-04-10 21:24:18 +00:00
|
|
|
apt-get install git wget procps unzip -y
|
2019-05-30 23:51:06 +00:00
|
|
|
|
2019-06-02 11:01:52 +00:00
|
|
|
# Install pcntl and redis extentions
|
2019-06-02 10:21:42 +00:00
|
|
|
pecl install -o -f redis \
|
2023-02-07 02:19:09 +00:00
|
|
|
&& rm -rf /tmp/pear \
|
|
|
|
&& docker-php-ext-enable redis
|
2019-06-02 10:21:42 +00:00
|
|
|
docker-php-ext-install pcntl
|
2019-05-30 23:51:06 +00:00
|
|
|
|
2019-06-02 11:01:52 +00:00
|
|
|
# Install Composer
|
2019-06-02 10:21:42 +00:00
|
|
|
wget https://getcomposer.org/composer.phar
|
2020-04-10 21:24:18 +00:00
|
|
|
php composer.phar install --dev
|
2019-05-30 23:51:06 +00:00
|
|
|
|
2023-02-07 01:34:41 +00:00
|
|
|
services:
|
|
|
|
- redis:7
|
|
|
|
|
2023-02-07 01:20:30 +00:00
|
|
|
# Test PHP
|
|
|
|
test:
|
|
|
|
image: php:$PHP_VERSION
|
|
|
|
parallel:
|
|
|
|
matrix:
|
2023-02-07 01:34:41 +00:00
|
|
|
- PHP_VERSION: [ "7.4", "8.0", "8.1", "8.2" ]
|
2021-02-18 23:23:32 +00:00
|
|
|
before_script:
|
|
|
|
- *docker_boostrap
|
|
|
|
script:
|
|
|
|
- php vendor/bin/phpunit --verbose --configuration phpunit.xml
|
2019-05-30 23:49:08 +00:00
|
|
|
tags:
|
2021-02-18 23:23:32 +00:00
|
|
|
- docker
|
|
|
|
|
|
|
|
# Codestandards
|
|
|
|
lint:
|
2023-02-07 01:20:30 +00:00
|
|
|
image: php:8.2
|
2021-02-18 23:23:32 +00:00
|
|
|
allow_failure: true
|
|
|
|
script:
|
|
|
|
- apt update && apt install -y wget unzip git
|
|
|
|
- wget https://getcomposer.org/composer.phar
|
|
|
|
- php composer.phar install --dev
|
|
|
|
- php -d memory_limit=256M vendor/bin/phpcs -s --standard=ruleset.xml
|