mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-21 16:01:53 +00:00
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
.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
|
|
apt-get install git wget procps unzip -y
|
|
|
|
# Install pcntl and redis extentions
|
|
pecl install -o -f redis \
|
|
&& rm -rf /tmp/pear \
|
|
&& docker-php-ext-enable redis
|
|
docker-php-ext-install pcntl
|
|
|
|
# Install Composer
|
|
wget https://getcomposer.org/composer.phar
|
|
php composer.phar install --dev
|
|
|
|
services:
|
|
- redis:7
|
|
|
|
# Test PHP
|
|
test:
|
|
image: php:$PHP_VERSION
|
|
parallel:
|
|
matrix:
|
|
- PHP_VERSION: [ "7.4", "8.0", "8.1", "8.2" ]
|
|
before_script:
|
|
- *docker_boostrap
|
|
script:
|
|
- php vendor/bin/phpunit --verbose --configuration phpunit.xml
|
|
tags:
|
|
- docker
|
|
|
|
# Codestandards
|
|
lint:
|
|
image: php:8.2
|
|
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 |