Translated using Weblate (Turkish)
[phpmyadmin.git] / .travis.yml
blob043210fb3ac8a0b558a9830e2e28d34851da6c26
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   - composer install --no-interaction
13   - yarn install --non-interactive
15 before_script:
16   - export TESTSUITE_PASSWORD=`openssl rand -base64 30`
17   - export TESTSUITE_BROWSERSTACK_KEY=`echo cHlDcHJTNmZwZjVlaUR2RmV6VkU= | base64 --decode`
18   - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
19   - mysql -uroot < sql/create_tables.sql
20   - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
21   - ./test/start-local-server
23 script:
24   - ./scripts/generate-mo --quiet
25   - ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium
27 after_script:
28   - if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
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 build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
32   - if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
33   - if [ "$CI_MODE" = "selenium" ] ; then ~/browserstack/BrowserStackLocal --daemon stop; fi
35 after_success: bash <(curl -s https://codecov.io/bash)
37 services:
38   - mysql
40 cache:
41   pip: true
42   yarn: true
43   directories:
44     - $HOME/.composer/cache/
45     - $HOME/browserstack
46     - node_modules
48 jobs:
49   allow_failures:
50     - php: nightly
51     - os: windows
52     - os: osx
53     - name: "PHP 7.1 with dbase extension"
54     - name: "PHP 7.4"
56   include:
57     - stage: "Lint and analyse code"
58       name: "Lint files"
59       before_script: skip
60       after_script: skip
61       after_success: skip
62       script:
63         - ./test/ci-phplint
64         - composer phpcs
65         - yarn run js-lint --quiet
66         - yarn run css-lint
68     - stage: "Lint and analyse code"
69       name: "Run phpstan"
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.4snapshot
92       name: "PHP 7.4"
93       env: CI_MODE=test
95     - stage: "PHP Unit tests"
96       php: nightly
97       name: "PHP nightly"
98       env: CI_MODE=test
99       install:
100         - composer install --no-interaction --ignore-platform-reqs
101         - yarn install --non-interactive
103     - stage: "PHP Unit tests"
104       name: "OSX"
105       os: osx
106       env: CI_MODE=test
107       language: node_js
108       node_js: 10
109       before_install:
110         - brew link --force gettext
111         - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini
112         - mysql.server start
113       addons:
114         homebrew:
115           packages:
116             - php
117             - composer
118             - mariadb
120     - stage: "PHP Unit tests"
121       name: "Windows"
122       os: windows
123       language: node_js
124       node_js: 10
125       env: CI_MODE=test
126       before_install:
127         - choco install php composer mariadb
128         - export PATH=/c/tools/php73:/c/ProgramData/ComposerSetup/bin:/c/"Program Files"/"MariaDB 10.3"/bin:$PATH
129         - PHP_EXTENSIONS="mysqli curl bz2 gd2 pdo_mysql"
130         - for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php73/php.ini ; done
131         - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php73/php.ini
132         - find . -type f -name "*.php" -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
134     - stage: "PHP Unit tests"
135       php: 7.1
136       name: "PHP 7.1 with dbase extension"
137       env: CI_MODE=test
138       install:
139         - pecl channel-update pecl.php.net
140         - pecl install dbase-7.0.0beta1
141         - composer install --no-interaction
142         - yarn install --non-interactive
144     - stage: "Documentation"
145       name: "Build docs"
146       before_script: skip
147       after_script: skip
148       after_success: skip
149       install:
150         - source ~/virtualenv/python3.6/bin/activate
151         - pip install 'Sphinx'
152       script: ./test/ci-docs
154     - stage: "Documentation"
155       name: "Build API docs"
156       before_script: skip
157       after_script: skip
158       after_success: skip
159       install: composer global require "sami/sami:^4.0"
160       script: $HOME/.composer/vendor/bin/sami.php --no-interaction update ./test/sami-config.php
162     - stage: "Other tests"
163       name: "Build release"
164       before_script: skip
165       after_script: skip
166       after_success: skip
167       install:
168         - source ~/virtualenv/python3.6/bin/activate
169         - pip install 'Sphinx'
170       script: ./scripts/create-release.sh --ci
172     - stage: "Other tests"
173       name: "Run selenium tests on Google Chrome"
174       env:
175         - CI_MODE=selenium
176         - TESTSUITE_SELENIUM_BROWSER=chrome
177         - TESTSUITE_USER=root
178         - TESTSUITE_URL=http://127.0.0.1:8000
179       install:
180         - ./test/install-browserstack
181         - composer install --no-interaction
182         - yarn install --non-interactive
183         - echo -e "<?php\n\$cfg['UploadDir'] = './test/test_data/';" > config.inc.php
184       script: ./vendor/bin/phpunit --configuration phpunit.xml.nocoverage --group selenium --verbose --debug
185       addons:
186         apt:
187           packages:
188             - nginx