6 - name: "Lint and analyse code"
7 - name: "PHP Unit tests"
8 - name: "Documentation"
12 - composer install --no-interaction
13 - yarn install --non-interactive
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
24 - ./scripts/generate-mo --quiet
25 - ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium
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)
44 - $HOME/.composer/cache/
53 - name: "PHP 7.1 with dbase extension"
57 - stage: "Lint and analyse code"
65 - yarn run js-lint --quiet
68 - stage: "Lint and analyse code"
73 script: composer phpstan
75 - stage: "PHP Unit tests"
80 - stage: "PHP Unit tests"
85 - stage: "PHP Unit tests"
90 - stage: "PHP Unit tests"
95 - stage: "PHP Unit tests"
100 - composer install --no-interaction --ignore-platform-reqs
101 - yarn install --non-interactive
103 - stage: "PHP Unit tests"
110 - brew link --force gettext
111 - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini
120 - stage: "PHP Unit tests"
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"
136 name: "PHP 7.1 with dbase extension"
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"
150 - source ~/virtualenv/python3.6/bin/activate
151 - pip install 'Sphinx'
152 script: ./test/ci-docs
154 - stage: "Documentation"
155 name: "Build API docs"
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"
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"
176 - TESTSUITE_SELENIUM_BROWSER=chrome
177 - TESTSUITE_USER=root
178 - TESTSUITE_URL=http://127.0.0.1:8000
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