Translated using Weblate (Albanian)
[phpmyadmin.git] / .travis.yml
blob39b2bc780e24a7ac4a75af17472383de5775218c
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.2"
15   - "7.1"
16   - "7.0"
17   - "5.6"
18   - "5.5"
19   - "hhvm-3.12"
20   - "hhvm-3.18"
21   - "nightly"
23 sudo: required
25 env:
26   matrix:
27     - CI_MODE=test
28   global:
29     - TESTSUITE_USER=root
30     - TESTSUITE_URL=http://127.0.0.1:8000
32 install:
33   - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then source ~/virtualenv/python3.6/bin/activate ; fi
34   - ./test/ci-install-$CI_MODE
35   - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then case "$TRAVIS_PHP_VERSION" in hhvm*) ;; *) phpenv config-add test/php-noprofile.ini ;; esac ; fi
37 before_script:
38   - export TESTSUITE_PASSWORD=`openssl rand -base64 30`
39   - export TESTSUITE_BROWSERSTACK_KEY=`echo eDJkYVJzelR5bnJMbkthTEFBcXI= | base64 --decode`
40   - export PATH=~/.composer/vendor/bin/:$PATH
41   - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
42   - mysql -uroot < sql/create_tables.sql
43   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
44   - ./test/start-local-server
46 script:
47   - ./scripts/generate-mo --quiet
48   - if [ $CI_MODE = test ] ; then ./test/ci-lint ; fi
49   - ./test/ci-$CI_MODE
51 after_script:
52   - if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
53   - if [ -f php.log ] ; then cat php.log ; fi
54   - if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
55   - if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
56   - if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
58 after_success:
59   - bash <(curl -s https://codecov.io/bash)
61 matrix:
62   fast_finish: true
63   include:
64     - php: "7.1"
65       env: CI_MODE=selenium
66     - php: "7.0"
67       env: CI_MODE=release
68     - php: "7.1"
69       env: CI_MODE=docs
70     - php: "7.1"
71       env: CI_MODE=apidocs
72     - os: osx
73       language: generic
74       env: CI_MODE=test
75       before_install:
76         - brew update
77         - brew tap homebrew/php
78         - brew install gettext php72 mariadb
79         - brew link --force gettext
80         - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini
81         - curl https://getcomposer.org/installer | php
82         - ln -s "`pwd`/composer.phar" /usr/local/bin/composer
83         - mysql.server start
85   allow_failures:
86     - php: "nightly"
87       env: CI_MODE=test
89 cache:
90   pip: true
91   directories:
92     - $HOME/.composer/cache/
93     - $HOME/browserstack
94     - $HOME/runkit
95 # Install APT packages
96 #  - git > 2.5.1 needed for worktrees
97 #  - mysql server does not seem to be always present on Travis Trusty environment
98 addons:
99   apt:
100     packages:
101     - git
102     - mysql-server-5.6
103     - nginx