summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: fee02856e95ca3930f797d1a7875ba66c8ace659 (plain)
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
language: php
php:
  - 5.4
  - 5.6
  - 7.0
  - 7.1
  - hhvm
env: PHPV=0
matrix:
  include:
    - php: 5.2
      dist: precise
      env: PHPV=52
    - php: 5.3
      dist: precise
before_install: |
  if [ "$PHPV" -eq 52 ]; then
    pecl install phar
  fi
install: |
  if [ "$PHPV" -ne 52 ]; then
    composer install
  else
    # special handling for PHP 5.2 testing as there is no composer available
    export X="$HOME/.idiorm/bin"
    mkdir -p "$X"
    curl -sSfL https://github.com/treffynnon/php5.2-phpunit3.6.12-phar/releases/download/1.0.2/php52-phpunit.phar -o "$X/phpunit"
    chmod +x "$X/phpunit"
  fi
script: |
  if [ "$PHPV" -ne 52 ]; then
    composer run-script test -- --colors --coverage-text
  else
    # special handling for PHP 5.2 testing as there is no composer available
    # we need phpunit-3.6.12, but there is no phar file for it so comment out for now
    $X/phpunit --colors --coverage-text
  fi
cache:
  directories:
    - $HOME/.composer/cache
    - $HOME/.idiorm
    - vendor