Translated using Weblate (Turkish)
[phpmyadmin.git] / .travis.yml
blob91ce9375fce04aa4557052090acd85dd7c79d624
1 dist: xenial
3 language: php
5 stages:
6   - name: "Lint and analyse code"
7   - name: "PHP Unit tests"
8   - name: "Documentation"
9   - name: "Other tests"
11 install:
12   - nvm install 10
13   - composer install --no-interaction
14   - yarn install --non-interactive
16 before_script:
17   - export TESTSUITE_PASSWORD=`openssl rand -base64 30`
18   - export TESTSUITE_BROWSERSTACK_KEY=`echo cHlDcHJTNmZwZjVlaUR2RmV6VkU= | base64 --decode`
19   - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
20   - mysql -uroot < sql/create_tables.sql
21   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
22   - ./test/start-local-server
24 script:
25   - ./scripts/generate-mo --quiet
26   - ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium
28 after_script:
29   - if [ -f php.log ] ; then cat php.log ; fi
30   - if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
31   - if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
32   - if [ "$CI_MODE" = "selenium" ] ; then ~/browserstack/BrowserStackLocal --daemon stop; fi
34 after_success:
35   - bash <(curl -s https://codecov.io/bash)
36   - bash <(curl -Ls https://coverage.codacy.com/get.sh)
38 services:
39   - mysql
41 cache:
42   pip: true
43   yarn: true
44   directories:
45     - $HOME/.composer/cache/
46     - $HOME/browserstack
47     - node_modules
49 jobs:
50   allow_failures:
51     - php: nightly
52     - os: osx
54   include:
55     - stage: "Lint and analyse code"
56       name: "Lint files"
57       before_install: phpenv config-rm xdebug.ini
58       before_script: skip
59       after_script: skip
60       after_success: skip
61       script:
62         - ./test/ci-phplint
63         - composer phpcs
64         - yarn run js-lint --quiet
65         - yarn run css-lint
67     - stage: "Lint and analyse code"
68       name: "Run phpstan"
69       before_install: phpenv config-rm xdebug.ini
70       before_script: skip
71       after_script: skip
72       after_success: skip
73       script: composer phpstan
75     - stage: "PHP Unit tests"
76       php: 7.1
77       name: "PHP 7.1"
78       env: CI_MODE=test
80     - stage: "PHP Unit tests"
81       php: 7.2
82       name: "PHP 7.2"
83       env: CI_MODE=test
85     - stage: "PHP Unit tests"
86       php: 7.3
87       name: "PHP 7.3"
88       env: CI_MODE=test
90     - stage: "PHP Unit tests"
91       php: 7.4
92       name: "PHP 7.4"
93       env: CI_MODE=test
94       before_install: phpenv config-rm xdebug.ini
96     - stage: "PHP Unit tests"
97       php: nightly
98       name: "PHP nightly"
99       env: CI_MODE=test
100       install:
101         - nvm install 10
102         - composer install --no-interaction --ignore-platform-reqs
103         - yarn install --non-interactive
105     - stage: "PHP Unit tests"
106       name: "OSX"
107       os: osx
108       env: CI_MODE=test
109       language: node_js
110       node_js: 10
111       before_install:
112         - export PATH="/usr/local/opt/gettext/bin:$PATH"
113         - echo "memory_limit=-1" > /usr/local/etc/php/7.4/conf.d/50-travis.ini
114         - echo "pcre.jit=0" >> /usr/local/etc/php/7.4/conf.d/50-travis.ini
115         - mysql.server start
116         - sleep 5
117         # Enable password access
118         - mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');"
119       addons:
120         homebrew:
121           packages:
122             - php
123             - composer
124             - mariadb
125           update: true
127     - stage: "PHP Unit tests"
128       name: "Windows"
129       os: windows
130       language: node_js
131       node_js: 10
132       env:
133         - CI_MODE=test
134         - YARN_GPG=no
135       before_install:
136         - choco install php composer
137         - choco install mariadb --version=10.4.8
138         - export PATH=/c/tools/php74:/c/ProgramData/ComposerSetup/bin:/c/"Program Files"/"MariaDB 10.4"/bin:$PATH
139         - PHP_EXTENSIONS="mysqli curl bz2 gd2 pdo_mysql"
140         - for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php74/php.ini ; done
141         - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php74/php.ini
142         - find . -type f -name "*.php" -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
143       install:
144         - composer install --no-interaction
145         - yarn install --non-interactive
147     - stage: "PHP Unit tests"
148       php: 7.1
149       name: "PHP 7.1 with dbase extension"
150       env: CI_MODE=test
151       install:
152         - nvm install 10
153         - pecl channel-update pecl.php.net
154         - pecl install dbase
155         - php -m |grep -F 'dbase'
156         - composer install --no-interaction
157         - yarn install --non-interactive
159     - stage: "Documentation"
160       name: "Build docs"
161       before_script: skip
162       after_script: skip
163       after_success: skip
164       install:
165         - source ~/virtualenv/python3.6/bin/activate
166         - pip install 'Sphinx'
167       script: ./test/ci-docs
169     - stage: "Documentation"
170       name: "Build API docs"
171       before_install: phpenv config-rm xdebug.ini
172       before_script: skip
173       after_script: skip
174       after_success: skip
175       install: composer global require "code-lts/doctum:^5.0"
176       script: $HOME/.composer/vendor/bin/doctum.php --no-interaction update ./test/doctum-config.php
178     - stage: "Other tests"
179       name: "Build release"
180       before_script: skip
181       after_script: skip
182       after_success: skip
183       install:
184         - nvm install 10
185         - source ~/virtualenv/python3.6/bin/activate
186         - pip install 'Sphinx'
187       script: ./scripts/create-release.sh --ci
189     - stage: "Other tests"
190       name: "Run selenium tests on Google Chrome"
191       env:
192         - CI_MODE=selenium
193         - TESTSUITE_SELENIUM_BROWSER=chrome
194         - TESTSUITE_USER=root
195         - TESTSUITE_URL=http://127.0.0.1:8000
196       before_install: phpenv config-rm xdebug.ini
197       install:
198         - nvm install 10
199         - ./test/install-browserstack
200         - composer install --no-interaction
201         - yarn install --non-interactive
202         - echo -e "<?php\n\$cfg['UploadDir'] = './test/test_data/';" > config.inc.php
203       script: ./vendor/bin/phpunit --configuration phpunit.xml.nocoverage --group selenium --verbose --debug
204       addons:
205         apt:
206           packages:
207             - nginx