5 - name: "Lint and analyse code"
6 - name: "PHP Unit tests"
7 - name: "Documentation"
11 - composer install --no-interaction
12 - yarn install --non-interactive
15 - export TESTSUITE_PASSWORD=`openssl rand -base64 30`
16 - export TESTSUITE_BROWSERSTACK_KEY=`echo cHlDcHJTNmZwZjVlaUR2RmV6VkU= | base64 --decode`
17 - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
18 - mysql -uroot < sql/create_tables.sql
19 - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
20 - ./test/start-local-server
23 - ./scripts/generate-mo --quiet
24 - ./vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group selenium
27 - if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
28 - if [ -f php.log ] ; then cat php.log ; fi
29 - if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
30 - if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; 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: bash <(curl -s https://codecov.io/bash)
40 - name: "PHP 7.1 with dbase extension"
43 - stage: "Lint and analyse code"
52 - yarn run js-lint --quiet
55 - stage: "Lint and analyse code"
61 script: composer phpstan
63 - stage: "PHP Unit tests"
68 - stage: "PHP Unit tests"
73 - stage: "PHP Unit tests"
78 - stage: "PHP Unit tests"
83 - stage: "PHP Unit tests"
90 - brew link --force gettext
91 - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.2/php.ini
100 - stage: "PHP Unit tests"
107 - choco install php composer mariadb
108 - export PATH=/c/tools/php73:/c/ProgramData/ComposerSetup/bin:/c/"Program Files"/"MariaDB 10.3"/bin:$PATH
109 - PHP_EXTENSIONS="mysqli curl bz2 gd2 pdo_mysql"
110 - for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php73/php.ini ; done
111 - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php73/php.ini
112 - find . -type f -name "*.php" -print0 | xargs -0 sed -i ':a;N;$!ba;s/\r//g'
114 - stage: "PHP Unit tests"
115 name: "PHP 7.1 with dbase extension"
119 - pecl channel-update pecl.php.net
120 - pecl install dbase-7.0.0beta1
121 - composer install --no-interaction
122 - yarn install --non-interactive
124 - stage: "Documentation"
130 - source ~/virtualenv/python3.6/bin/activate
131 - pip install 'Sphinx'
132 script: ./test/ci-docs
134 - stage: "Documentation"
135 name: "Build API docs"
140 install: composer global require "sami/sami:^4.0"
141 script: $HOME/.composer/vendor/bin/sami.php --no-interaction update ./test/sami-config.php
143 - stage: "Other tests"
144 name: "Build release"
150 - source ~/virtualenv/python3.6/bin/activate
151 - pip install 'Sphinx'
152 script: ./scripts/create-release.sh --ci
154 - stage: "Other tests"
155 name: "Run selenium tests on Google Chrome"
159 - TESTSUITE_SELENIUM_BROWSER=chrome
160 - TESTSUITE_USER=root
161 - TESTSUITE_URL=http://127.0.0.1:8000
163 - ./test/install-browserstack
164 - composer install --no-interaction
165 - yarn install --non-interactive
166 - echo -e "<?php\n\$cfg['UploadDir'] = './test/test_data/';" > config.inc.php
167 script: ./vendor/bin/phpunit --configuration phpunit.xml.nocoverage --group selenium --verbose --debug
177 - $HOME/.composer/cache/