forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (81 loc) · 2.28 KB
/
.travis.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# The Travis setup:
# - run testsuite for every PHP version
# - run lint for every PHP version
# - run Selenium for single PHP version
dist: trusty
language: php
services:
- mysql
php:
- "7.1"
- "7.0"
- "5.6"
- "5.5"
- hhvm-3.3
- hhvm-3.12
- hhvm-3.18
sudo: required
env:
matrix:
- CI_MODE=test
global:
- TESTSUITE_USER=root
- TESTSUITE_URL=http://127.0.0.1:8000
install:
- ./test/ci-install-$CI_MODE
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then case "$TRAVIS_PHP_VERSION" in hhvm*) ;; *) phpenv config-add test/php-noprofile.ini ;; esac ; fi
before_script:
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
- export PATH=~/.composer/vendor/bin/:$PATH
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
- mysql -uroot < sql/create_tables.sql
- mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
- ./test/start-local-server
script:
- ./scripts/generate-mo --quiet
- if [ $CI_MODE = test ] ; then ./test/ci-lint ; fi
- ./test/ci-$CI_MODE
after_script:
- if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi
- if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
- if [ -f php.log ] ; then cat php.log ; fi
- if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
after_success:
- bash <(curl -s https://codecov.io/bash)
matrix:
allow_failures:
- php: "7.0"
env: CI_MODE=selenium
fast_finish: true
include:
- php: "7.0"
env: CI_MODE=selenium
- php: "7.0"
env: CI_MODE=release
- php: "7.0"
env: CI_MODE=docs
- os: osx
language: generic
env: CI_MODE=test
before_install:
- brew tap homebrew/php
- brew update
- brew install gettext php70 mariadb
- brew link --force gettext
- curl https://getcomposer.org/installer | php
- ln -s "`pwd`/composer.phar" /usr/local/bin/composer
- mysql.server start
cache:
pip: true
directories:
- $HOME/.composer/cache/
- $HOME/browserstack
- $HOME/runkit
# Install APT packages
# - git > 2.5.1 needed for worktrees
# - mysql server does not seem to be always present on Travis Trusty environment
addons:
apt:
packages:
- git
- mysql-server-5.6