forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
187 lines (163 loc) · 5.31 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
dist: xenial
language: php
stages:
- name: "Lint and analyse code"
- name: "PHP Unit tests"
- name: "Documentation"
- name: "Other tests"
install:
- composer install --no-interaction
- yarn install --non-interactive
before_script:
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
- export TESTSUITE_BROWSERSTACK_KEY=`echo cHlDcHJTNmZwZjVlaUR2RmV6VkU= | base64 --decode`
- 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
- ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium
after_script:
- if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
- if [ -f php.log ] ; then cat php.log ; fi
- if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
- if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
- if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
- if [ "$CI_MODE" = "selenium" ] ; then ~/browserstack/BrowserStackLocal --daemon stop; fi
after_success: bash <(curl -s https://codecov.io/bash)
services:
- mysql
cache:
pip: true
yarn: true
directories:
- $HOME/.composer/cache/
- $HOME/browserstack
- node_modules
jobs:
allow_failures:
- php: nightly
- os: windows
- name: "PHP 7.1 with dbase extension"
- name: "PHP 7.4"
include:
- stage: "Lint and analyse code"
name: "Lint files"
before_script: skip
after_script: skip
after_success: skip
script:
- ./test/ci-phplint
- composer phpcs
- yarn run js-lint --quiet
- yarn run css-lint
- stage: "Lint and analyse code"
name: "Run phpstan"
before_script: skip
after_script: skip
after_success: skip
script: composer phpstan
- stage: "PHP Unit tests"
php: 7.1
name: "PHP 7.1"
env: CI_MODE=test
- stage: "PHP Unit tests"
php: 7.2
name: "PHP 7.2"
env: CI_MODE=test
- stage: "PHP Unit tests"
php: 7.3
name: "PHP 7.3"
env: CI_MODE=test
- stage: "PHP Unit tests"
php: 7.4snapshot
name: "PHP 7.4"
env: CI_MODE=test
- stage: "PHP Unit tests"
php: nightly
name: "PHP nightly"
env: CI_MODE=test
install:
- composer install --no-interaction --ignore-platform-reqs
- yarn install --non-interactive
- stage: "PHP Unit tests"
name: "OSX"
os: osx
env: CI_MODE=test
language: node_js
node_js: 10
before_install:
- brew link --force gettext
- sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini
- mysql.server start
addons:
homebrew:
packages:
- php
- composer
- mariadb
- stage: "PHP Unit tests"
name: "Windows"
os: windows
language: node_js
node_js: 10
env: CI_MODE=test
before_install:
- choco install php composer mariadb
- export PATH=/c/tools/php73:/c/ProgramData/ComposerSetup/bin:/c/"Program Files"/"MariaDB 10.3"/bin:$PATH
- PHP_EXTENSIONS="mysqli curl bz2 gd2 pdo_mysql"
- for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php73/php.ini ; done
- sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php73/php.ini
- find . -type f -name "*.php" -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
- stage: "PHP Unit tests"
php: 7.1
name: "PHP 7.1 with dbase extension"
env: CI_MODE=test
install:
- pecl channel-update pecl.php.net
- pecl install dbase-7.0.0beta1
- composer install --no-interaction
- yarn install --non-interactive
- stage: "Documentation"
name: "Build docs"
before_script: skip
after_script: skip
after_success: skip
install:
- source ~/virtualenv/python3.6/bin/activate
- pip install 'Sphinx'
script: ./test/ci-docs
- stage: "Documentation"
name: "Build API docs"
before_script: skip
after_script: skip
after_success: skip
install: composer global require "sami/sami:^4.0"
script: $HOME/.composer/vendor/bin/sami.php --no-interaction update ./test/sami-config.php
- stage: "Other tests"
name: "Build release"
before_script: skip
after_script: skip
after_success: skip
install:
- source ~/virtualenv/python3.6/bin/activate
- pip install 'Sphinx'
script: ./scripts/create-release.sh --ci
- stage: "Other tests"
name: "Run selenium tests on Google Chrome"
env:
- CI_MODE=selenium
- TESTSUITE_SELENIUM_BROWSER=chrome
- TESTSUITE_USER=root
- TESTSUITE_URL=http://127.0.0.1:8000
install:
- ./test/install-browserstack
- composer install --no-interaction
- yarn install --non-interactive
- echo -e "<?php\n\$cfg['UploadDir'] = './test/test_data/';" > config.inc.php
script: ./vendor/bin/phpunit --configuration phpunit.xml.nocoverage --group selenium --verbose --debug
addons:
apt:
packages:
- nginx