-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
32 lines (28 loc) · 1.22 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Before Script
before_script:
- apt-get update -yqq > /dev/null
- apt-get install git -yqq > /dev/null
- apt-get install wget -yqq > /dev/null
- apt-get install -yqq zlib1g-dev > /dev/null
- docker-php-ext-install zip > /dev/null
- docker-php-ext-install exif > /dev/null
- pecl install xdebug > /dev/null
- echo "zend_extension=xdebug.so" >> /usr/local/etc/php/conf.d/test.ini
# Install and run composer
- wget https://composer.github.io/installer.sig -O - -q | tr -d '\n' > installer.sig
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php -r "if (hash_file('SHA384', 'composer-setup.php') === file_get_contents('installer.sig')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
- php composer-setup.php > /dev/null
- php -r "unlink('composer-setup.php'); unlink('installer.sig');"
- php composer.phar install --no-progress > /dev/null
- useradd testuser
cache:
paths:
- vendor/
# PHP 5.5
php:7.0:
image: php:7.0
script:
- php vendor/bin/phpstan analyse --no-progress -l 7 src -c phpstan.neon
- echo "Running PHPUnit Tests"
- su testuser -c "php vendor/bin/phpunit --colors="never" --coverage-text"