6 - name: "Lint and analyse code"
7 - name: "PHP Unit tests"
8 - name: "Documentation"
13 - composer install --no-interaction
14 - yarn install --non-interactive
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
25 - ./scripts/generate-mo --quiet
26 - ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium
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
35 - bash <(curl -s https://codecov.io/bash)
36 - bash <(curl -Ls https://coverage.codacy.com/get.sh)
45 - $HOME/.composer/cache/
53 - name: "PHPUnit tests in random order"
56 - stage: "Lint and analyse code"
58 before_install: phpenv config-rm xdebug.ini
65 - yarn run js-lint --quiet
68 - stage: "Lint and analyse code"
70 before_install: phpenv config-rm xdebug.ini
74 script: composer phpstan
76 - stage: "PHP Unit tests"
81 - stage: "PHP Unit tests"
86 - stage: "PHP Unit tests"
91 - stage: "PHP Unit tests"
95 before_install: phpenv config-rm xdebug.ini
97 - stage: "PHP Unit tests"
102 - composer install --no-interaction --ignore-platform-reqs
104 - yarn install --non-interactive
106 - stage: "PHP Unit tests"
113 - brew link --force gettext
114 - echo "memory_limit=-1" > /usr/local/etc/php/7.4/conf.d/50-travis.ini
115 - echo "pcre.jit=0" >> /usr/local/etc/php/7.4/conf.d/50-travis.ini
118 # Enable password access
119 - mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');"
128 - stage: "PHP Unit tests"
137 - composer install --no-interaction
138 - yarn install --non-interactive
140 - choco install php composer
141 - choco install mariadb --version=10.4.8
142 - export PATH=/c/tools/php74:/c/ProgramData/ComposerSetup/bin:/c/"Program Files"/"MariaDB 10.4"/bin:$PATH
143 - PHP_EXTENSIONS="mysqli curl bz2 gd2 pdo_mysql"
144 - for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php74/php.ini ; done
145 - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php74/php.ini
146 - find . -type f -name "*.php" -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
148 - stage: "PHP Unit tests"
150 name: "PHP 7.1 with dbase extension"
153 - pecl channel-update pecl.php.net
155 - php -m |grep -F 'dbase'
156 - composer install --no-interaction
158 - yarn install --non-interactive
160 - stage: "PHP Unit tests"
162 name: "PHPUnit tests in random order"
165 - scripts/generate-mo --quiet
166 - vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium --order-by=random --stop-on-failure
168 - stage: "Documentation"
174 - source ~/virtualenv/python3.6/bin/activate
175 - pip install 'Sphinx'
176 script: ./test/ci-docs
178 - stage: "Documentation"
179 name: "Build API docs"
180 before_install: phpenv config-rm xdebug.ini
184 install: composer global require "sami/sami:^4.0"
185 script: $HOME/.composer/vendor/bin/sami.php --no-interaction update ./test/sami-config.php
187 - stage: "Other tests"
188 name: "Build release"
194 - source ~/virtualenv/python3.6/bin/activate
195 - pip install 'Sphinx'
196 script: ./scripts/create-release.sh --ci
198 - stage: "Other tests"
199 name: "Run selenium tests on Google Chrome"
202 - TESTSUITE_SELENIUM_BROWSER=chrome
203 - TESTSUITE_USER=root
204 - TESTSUITE_URL=http://127.0.0.1:8000
205 before_install: phpenv config-rm xdebug.ini
208 - ./test/install-browserstack
209 - composer install --no-interaction
210 - yarn install --non-interactive
211 - echo -e "<?php\n\$cfg['UploadDir'] = './test/test_data/';" > config.inc.php
212 script: ./vendor/bin/phpunit --configuration phpunit.xml.nocoverage --group selenium --verbose --debug