2021-01-25 12:44:05 -08:00
|
|
|
# Select what we should cache between builds
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- vendor/
|
2021-01-25 12:47:10 -08:00
|
|
|
variables:
|
|
|
|
XDEBUG_MODE: coverage
|
2021-01-25 12:44:05 -08:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- apt-get update -yqq
|
2021-01-25 12:59:14 -08:00
|
|
|
- apt-get install -yqq git libzip-dev unzip zip zlib1g-dev libxml2-dev libpcre3-dev libffi-dev
|
2021-01-25 12:44:05 -08:00
|
|
|
# Install PHP extensions
|
2021-01-25 12:51:49 -08:00
|
|
|
- docker-php-ext-install zip ffi
|
2021-01-25 12:44:05 -08:00
|
|
|
# Install & enable Xdebug for code coverage reports
|
|
|
|
- pecl install xdebug
|
|
|
|
- docker-php-ext-enable xdebug
|
|
|
|
# Install and run Composer
|
|
|
|
- curl -sS https://getcomposer.org/installer | php
|
|
|
|
- php composer.phar install
|
|
|
|
|
|
|
|
# Run our tests
|
|
|
|
# If Xdebug was installed you can generate a coverage report and see code coverage metrics.
|
|
|
|
test:7.4:
|
2021-01-25 12:46:52 -08:00
|
|
|
only:
|
2021-03-01 11:10:51 -08:00
|
|
|
- 1.x
|
2021-01-25 12:45:44 -08:00
|
|
|
tags:
|
|
|
|
- default
|
2021-01-25 12:44:05 -08:00
|
|
|
image: php:7.4
|
|
|
|
script:
|
|
|
|
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
|
|
|
|
test:8.0:
|
2021-01-25 12:46:52 -08:00
|
|
|
only:
|
2021-03-01 11:10:51 -08:00
|
|
|
- 1.x
|
2021-01-25 12:45:44 -08:00
|
|
|
tags:
|
|
|
|
- default
|
2021-01-25 12:44:05 -08:00
|
|
|
image: php:8.0
|
|
|
|
script:
|
|
|
|
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
|