map/.gitlab-ci.yml

58 lines
1.4 KiB
YAML
Raw Normal View History

2021-03-04 11:31:59 -08:00
# Select what we should cache between builds
cache:
paths:
- vendor/
variables:
XDEBUG_MODE: coverage
before_script:
- apt-get update -yqq
- apt-get upgrade -yqq
- apt-get install -yqq git libzip-dev unzip zip libpcre3-dev
# Install PHP extensions
- docker-php-ext-install zip
# Install & enable Xdebug for code coverage reports
- pecl install xdebug
- docker-php-ext-enable xdebug
2021-03-04 11:41:02 -08:00
- >
if [ "$CI_JOB_NAME" == "test:7.4" || "$CI_JOB_NAME" == "test:8.0" ]; then
pecl install ds && docker-php-ext-enable ds
fi
2021-03-04 11:31:59 -08:00
# 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:
only:
- branches
tags:
- default
image: php:7.4
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
test:7.4-without-ext-ds:
only:
- branches
tags:
- default
image: php:7.4
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
test:8.0:
only:
- branches
tags:
- default
image: php:8.0
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never
test:8.0-without-ext-ds:
only:
- branches
tags:
- default
image: php:7.4
script:
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never