Translated using Weblate (Chinese (Traditional))
[phpmyadmin.git] / .travis.yml
blob9ce510f0c3732d5d2d27e018fd92fcc514b6a47f
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.4snapshot"
15   - "7.3"
16   - "7.2"
17   - "7.1"
18   - "7.0"
19   - "5.6"
20   - "5.5"
21   - "hhvm-3.12"
22   - "hhvm-3.18"
23   - "hhvm-3.21"
24   - "hhvm-3.24"
25   - "hhvm-3.27"
27 sudo: required
29 env:
30   matrix:
31     - CI_MODE=test
32   global:
33     - TESTSUITE_USER=root
34     - TESTSUITE_URL=http://127.0.0.1:8000
36 install:
37   - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then source ~/virtualenv/python3.6/bin/activate ; fi
38   - ./test/ci-install-$CI_MODE
39   - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then case "$TRAVIS_PHP_VERSION" in hhvm*) ;; *) phpenv config-add test/php-noprofile.ini ;; esac ; fi
41 before_script:
42   - export TESTSUITE_PASSWORD=`openssl rand -base64 30`
43   - export TESTSUITE_BROWSERSTACK_KEY=`echo cHlDcHJTNmZwZjVlaUR2RmV6VkU= | base64 --decode`
44   - export PATH=~/.composer/vendor/bin/:$PATH
45   - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
46   - mysql -uroot < sql/create_tables.sql
47   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
48   - ./test/start-local-server
50 script:
51   - ./scripts/generate-mo --quiet
52   - if [ $CI_MODE = test ] ; then ./test/ci-lint ; fi
53   - ./test/ci-$CI_MODE
55 after_script:
56   - if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
57   - if [ -f php.log ] ; then cat php.log ; fi
58   - if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
59   - if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
60   - if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
62 after_success:
63   - bash <(curl -s https://codecov.io/bash)
65 matrix:
66   fast_finish: true
67   include:
68     - php: "7.1"
69       env: CI_MODE=selenium
70     - php: "7.0"
71       env: CI_MODE=release
72     - php: "7.1"
73       env: CI_MODE=docs
74     - php: "7.1"
75       env: CI_MODE=apidocs
76     - os: osx
77       name: "PHP 7.2"
78       language: node_js
79       node_js: 10
80       env: CI_MODE=test
81       before_install:
82         - brew link --force gettext
83         - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini
84         - mysql.server start
85       addons:
86         homebrew:
87           packages:
88             - php
89             - composer
90             - mariadb
91     - php: "7.1"
92       env: CI_MODE=test DBASE=true
93       install:
94         - pecl channel-update pecl.php.net
95         - pecl install dbase-7.0.0beta1
96         - test/ci-install-test
97     - php: "5.6"
98       env: CI_MODE=test DBASE=true
99       install:
100         - pecl channel-update pecl.php.net
101         - pecl install dbase
102         - test/ci-install-test
104   allow_failures:
105     - php: "7.4snapshot"
106     - env: CI_MODE=test DBASE=true
108 cache:
109   pip: true
110   directories:
111     - $HOME/.composer/cache/
112     - $HOME/browserstack
113     - $HOME/runkit
114 # Install APT packages
115 #  - git > 2.5.1 needed for worktrees
116 #  - mysql server does not seem to be always present on Travis Trusty environment
117 addons:
118   apt:
119     packages:
120     - git
121     - mysql-server-5.6
122     - nginx