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/
55 - stage: "Lint and analyse code"
57 before_install: phpenv config-rm xdebug.ini
64 - yarn run js-lint --quiet
67 - stage: "Lint and analyse code"
69 before_install: phpenv config-rm xdebug.ini
73 script: composer phpstan
75 - stage: "PHP Unit tests"
80 - stage: "PHP Unit tests"
85 - stage: "PHP Unit tests"
90 - stage: "PHP Unit tests"
94 before_install: phpenv config-rm xdebug.ini
96 - stage: "PHP Unit tests"
102 - composer install --no-interaction --ignore-platform-reqs
103 - yarn install --non-interactive
105 - stage: "PHP Unit tests"
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
117 # Enable password access
118 - mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('');"
127 - stage: "PHP Unit tests"
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'
144 - composer install --no-interaction
145 - yarn install --non-interactive
147 - stage: "PHP Unit tests"
149 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
157 - yarn install --non-interactive
159 - stage: "Documentation"
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
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"
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"
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
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