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