forked from GwendolenLynch/msgphp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (44 loc) · 1.24 KB
/
.travis.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
dist: trusty
sudo: false
language: php
notifications:
email: false
branches:
only:
- master
- /^\d\.\d$/
php: 7.2
jobs:
include:
- stage: Unit-tests
env: CC=true
- env: DEPS=low
- php: 7.1
- stage: Code-quality
install: true
script:
- bin/cs
- bin/sa
before_install:
- if [[ $CC = true && $TRAVIS_PULL_REQUEST != false ]] ; then unset CC ; fi
- if [[ $CC != true ]] ; then phpenv config-rm xdebug.ini || true ; fi
- source .travis/tfold
install:
- |
COMPOSER_ARGS="--no-progress --prefer-dist --no-interaction --no-suggest"
PHPUNIT_ARGS=""
if [[ $DEPS = low ]] ; then COMPOSER_ARGS="${COMPOSER_ARGS} --prefer-stable --prefer-lowest" ; fi
if [[ $CC = true ]] ; then PHPUNIT_ARGS="${PHPUNIT_ASRGS} --coverage-clover=coverage.xml" ; fi
- travis_retry .travis/packager HEAD^ $(find src/*/composer.json -type f -printf '%h\n')
- travis_retry bin/composer update $COMPOSER_ARGS
- travis_retry bin/phpunit install
script:
- bin/phpunit $PHPUNIT_ARGS
after_success:
- if [[ $CC = true ]] ; then bash <(curl -s https://codecov.io/bash) ; fi
before_cache:
- rm -rf $HOME/.composer/cache/files/msgphp
cache:
directories:
- $HOME/.composer/cache
- var/cache/