This repository was archived by the owner on Dec 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
41 lines (32 loc) · 1.69 KB
/
.travis.yml
File metadata and controls
41 lines (32 loc) · 1.69 KB
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
33
34
35
36
37
38
39
40
41
dist: trusty
sudo: false
language: php
git:
depth: 5
cache:
directories:
- $HOME/.composer/cache
php:
- 7.1
- 7.2
env:
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="~4.1"
# Only send code coverage to Code Climate for the current versions of PHP and Symfony LTS
# https://github.com/doctrine/doctrine2/blob/3570f4a49afc7e98fed71e0596dded6a39d4fd7b/.travis.yml#L16
before_install:
- if echo "$TRAVIS_COMMIT_MESSAGE" | grep -F -q "[skip travis]" ; then echo "[skip travis] has been found, exiting" && exit 0 ; else echo "[skip travis] has not been found, continuing" ; fi
- if [[ $TRAVIS_PHP_VERSION = '7.2' && $SYMFONY_VERSION = '3.4.*' ]]; then DEPENDENCY="codeclimate/php-test-reporter:~0.3 satooshi/php-coveralls:~1.0"; PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; else DEPENDENCY=""; PHPUNIT_FLAGS=""; fi
- if [[ $PHPUNIT_FLAGS = "" ]]; then phpenv config-rm xdebug.ini; fi
install:
- if [[ $SYMFONY_VERSION = '3.4.*' ]]; then composer require symfony/lts:v3 --no-update; fi
- composer require symfony/config:${SYMFONY_VERSION} symfony/form:${SYMFONY_VERSION} symfony/framework-bundle:${SYMFONY_VERSION} symfony/templating:${SYMFONY_VERSION} symfony/security-csrf:${SYMFONY_VERSION} symfony/var-dumper:${SYMFONY_VERSION} $DEPENDENCY --no-update
- composer install --no-interaction --profile --no-progress
script:
- php ./vendor/bin/phpspec run --format=pretty
- php ./vendor/bin/phpunit $PHPUNIT_FLAGS
- php ./vendor/bin/behat
# Only send code coverage if it has been generated
after_success:
- if [[ $PHPUNIT_FLAGS != "" ]]; then php ./vendor/bin/test-reporter; fi
- if [[ $PHPUNIT_FLAGS != "" ]]; then travis_retry php vendor/bin/coveralls -v --config .coveralls.yml; fi