php-resque/.gitlab-ci.yml

50 lines
1.1 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
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
2019-06-02 10:21:42 +00:00
services:
- redis:latest
2019-05-30 23:51:06 +00:00
# Test PHP 7.4
test:7.4:
image: php:7.4
2019-05-30 23:47:42 +00:00
before_script:
- *docker_boostrap
2018-10-12 23:53:14 +00:00
script:
- php vendor/bin/phpunit --verbose --configuration phpunit.xml
tags:
- docker
# Test PHP 8.0
test:8.0:
image: php:8.0
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:
image: php:8.0
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