php-resque/.gitlab-ci.yml

43 lines
1.0 KiB
YAML
Raw Normal View History

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
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 \
&& 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
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" ]
before_script:
- *docker_boostrap
script:
- php vendor/bin/phpunit --verbose --configuration phpunit.xml
2019-05-30 23:49:08 +00:00
tags:
- docker
# Codestandards
lint:
2023-02-07 01:20:30 +00:00
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