6 - name: "Lint and analyse code"
7 - name: "PHP Unit tests"
9 - name: "Documentation"
13 - composer install --no-interaction
14 - yarn install --non-interactive
17 - ./scripts/generate-mo --quiet
18 - composer run phpunit -- --exclude-group selenium
24 - $HOME/.composer/cache/
31 # https://github.com/phpmyadmin/phpmyadmin/issues/16479
32 - name: "Run selenium tests on Google Chrome"
35 - stage: "PHP Unit tests"
40 - composer install --no-interaction --ignore-platform-reqs
42 - yarn install --non-interactive
44 - stage: "PHP Unit tests"
51 - export PATH="/usr/local/opt/gettext/bin:$PATH"
52 - echo "memory_limit=-1" > /usr/local/etc/php/8.0/conf.d/50-travis.ini
53 - echo "pcre.jit=0" >> /usr/local/etc/php/8.0/conf.d/50-travis.ini
61 - stage: "PHP Unit tests"
70 - composer install --no-interaction --ignore-platform-reqs
71 - yarn install --non-interactive
73 - choco install php composer
74 - export PATH=/c/tools/php80:/c/ProgramData/ComposerSetup/bin:$PATH
75 - PHP_EXTENSIONS="mysqli curl bz2 gd2"
76 - for php_ext in $PHP_EXTENSIONS ; do sed -i -e "s/^;extension=${php_ext}/extension=${php_ext}/" /c/tools/php80/php.ini ; done
77 - sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /c/tools/php80/php.ini
79 - stage: "Other tests"
80 name: "Run selenium tests on Google Chrome"
83 - TESTSUITE_SELENIUM_BROWSER=chrome
85 - TESTSUITE_URL=http://127.0.0.1:8000
86 - TESTSUITE_SERVER="127.0.0.1"
87 - TESTSUITE_DATABASE="selenium"
88 - TESTSUITE_SELENIUM_HOST="127.0.0.1"
89 - TESTSUITE_SELENIUM_PORT="4444"
92 - docker run -d -e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 --rm --name=selenium --net=host -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59
93 - phpenv config-rm xdebug.ini
94 - cp test/config.e2e.inc.php config.inc.php
96 - export TESTSUITE_PASSWORD=`openssl rand -base64 30`
97 - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS test"
98 - mysql -uroot < sql/create_tables.sql
99 - mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
100 - ./test/start-local-server
101 script: ./vendor/bin/phpunit --no-coverage --group selenium --verbose --debug
103 - if [ -f php.log ] ; then cat php.log ; fi
104 - if [ -f nginx-error.log ] ; then cat nginx-error.log ; fi
105 - if [ -f config.inc.php ] ; then rm -rf config.inc.php; fi
106 - ./test/stop-local-server
107 - docker logs selenium
108 - docker stop selenium