summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 1dc83909b0f7f2b21c3ab66b030a67db5dc5f865 (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
43
44

language: php

sudo: true

dist: trusty

matrix:
  include:
   - php: 5.3
     dist: precise
   - php: 5.4
   - php: 5.5
   - php: 5.6
   - php: 7.0
   - php: 7.1
   - php: 7.2

services:
  - memcached
  - mysql

before_script:
    - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then travis_retry composer --prefer-source --dev install; fi
    - if [ ${TRAVIS_PHP_VERSION:0:3} <= "5.6" ]; then  phpenv config-add travis.ini; fi
    - if [ ${TRAVIS_PHP_VERSION:0:3} >= "5.3" ]; then  phpenv config-add error_reporting.ini; fi
    - if [[ $TRAVIS_PHP_VERSION = 7.* ]]; then  composer require phpunit/phpunit 6.4.1; fi
    - composer install
    - mysql -e "create database IF NOT EXISTS test;" -uroot

before_install:
    - phpenv config-rm xdebug.ini || return 0

install:
     - git clone --depth=50 --branch=master git://github.com/smarty-php/smarty-phpunit.git

script:
   - cd smarty-phpunit
   - if [[ $TRAVIS_PHP_VERSION = 7.* ]]; then
        ../vendor/bin/phpunit ./;
    else
        phpunit ./;
    fi