Merge remote-tracking branch 'origin/QA_4_7' into QA_4_7
[phpmyadmin.git] / .travis.yml
blob2ebbd5f6a99d63a196b15f50cb70d93cc4e4f626
1 # The Travis setup:
2 # - run testsuite for every PHP version
3 # - run lint for every PHP version
4 # - run Selenium for single PHP version
6 dist: trusty
8 language: php
10 services:
11   - mysql
13 php:
14   - "7.1"
15   - "7.0"
16   - "5.6"
17   - "5.5"
18   - "hhvm-3.12"
19   - "hhvm-3.18"
21 sudo: required
23 env:
24   matrix:
25     - CI_MODE=test
26   global:
27     - TESTSUITE_USER=root
28     - TESTSUITE_PASSWORD=root
29     - TESTSUITE_URL=http://127.0.0.1:8000
31 install:
32   - ./test/ci-install-$CI_MODE
33   - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then case "$TRAVIS_PHP_VERSION" in hhvm*) ;; *) phpenv config-add test/php-noprofile.ini ;; esac ; fi
35 before_script:
36   - export PATH=~/.composer/vendor/bin/:$PATH
37   - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
38   - mysql -uroot < sql/create_tables.sql
39   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
40   - ./test/start-local-server
42 script:
43   - ./scripts/generate-mo --quiet
44   - if [ $CI_MODE = test ] ; then ./test/ci-lint ; fi
45   - ./test/ci-$CI_MODE
47 after_script:
48   - if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
49   - if [ -f php.log ] ; then cat php.log ; fi
50   - if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
52 after_success:
53   - bash <(curl -s https://codecov.io/bash)
55 matrix:
56   allow_failures:
57     - php: "7.0"
58       env: CI_MODE=selenium
59   fast_finish: true
60   include:
61     - php: "7.0"
62       env: CI_MODE=selenium
63     - php: "7.0"
64       env: CI_MODE=release
65     - php: "7.0"
66       env: CI_MODE=docs
67     - os: osx
68       language: generic
69       env: CI_MODE=test
70       before_install:
71         - brew tap homebrew/php
72         - brew update
73         - brew install gettext php70 mariadb
74         - brew link --force gettext
75         - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.0/php.ini
76         - curl https://getcomposer.org/installer | php
77         - ln -s "`pwd`/composer.phar" /usr/local/bin/composer
78         - mysql.server start
80 cache:
81   pip: true
82   directories:
83     - $HOME/.composer/cache/
84     - $HOME/browserstack
85     - $HOME/runkit
86 # Install APT packages
87 #  - git > 2.5.1 needed for worktrees
88 #  - mysql server does not seem to be always present on Travis Trusty environment
89 addons:
90   apt:
91     packages:
92     - git
93     - mysql-server-5.6