forked from phpmyadmin/phpmyadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
108 lines (98 loc) · 3.29 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
dist: xenial
language: php
stages:
- name: "PHP Unit tests"
- name: "Other tests"
install:
- composer install --no-interaction
script:
- ./scripts/generate-mo --quiet
- ./vendor/bin/phpunit --exclude-group selenium
cache:
yarn: true
directories:
- $HOME/.composer/cache/
- node_modules
jobs:
allow_failures:
- php: nightly
- os: osx
- os: windows
# https://github.com/phpmyadmin/phpmyadmin/issues/16479
- name: "Run selenium tests on Google Chrome"
include:
- stage: "PHP Unit tests"
php: nightly
name: "PHP nightly"
install:
- composer install --no-interaction --ignore-platform-reqs
- stage: "PHP Unit tests"
name: "OSX"
os: osx
language: node_js
node_js: 10
before_install:
- export PATH="/usr/local/opt/gettext/bin:$PATH"
- echo "memory_limit=-1" > /usr/local/etc/php/8.0/conf.d/50-travis.ini
- echo "pcre.jit=0" >> /usr/local/etc/php/8.0/conf.d/50-travis.ini
addons:
homebrew:
packages:
- composer
update: true
- stage: "PHP Unit tests"
name: "Windows"
os: windows
language: node_js
node_js: 10
cache: false
install:
- composer install --no-interaction --ignore-platform-reqs
before_install:
- choco install php composer
- export PATH=/c/tools/php80:/c/ProgramData/ComposerSetup/bin:$PATH
- PHP_EXTENSIONS="mysqli curl bz2 gd2"
- for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php80/php.ini ; done
- sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php80/php.ini
- 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
- TESTSUITE_SERVER="127.0.0.1"
- TESTSUITE_DATABASE="selenium"
- TESTSUITE_SELENIUM_HOST="127.0.0.1"
- TESTSUITE_SELENIUM_PORT="4444"
- SKIP_STANDALONE=1
install:
- nvm install 10
- composer install --no-interaction
- yarn install --non-interactive
before_install:
- docker run -d -e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 --rm --name=selenium --net=host -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59
- phpenv config-rm xdebug.ini
- cp test/config.e2e.inc.php config.inc.php
before_script:
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
- 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: ./vendor/bin/phpunit --no-coverage --group selenium --verbose --debug
after_script:
- if [ -f php.log ] ; then cat php.log ; fi
- if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
- if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
- ./test/stop-local-server
- docker logs selenium
- docker stop selenium
services:
- docker
- mysql
addons:
apt:
packages:
- nginx