From 8536c437c4c396e029d851cb1074e9239dee4401 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 19 Dec 2020 21:41:54 +0100 Subject: [PATCH] [ticket/16659] Undo changes to travis folder Github actions are using their own scripts etc. PHPBB3-16659 --- travis/ldap/slapd.conf | 6 +-- travis/phpunit-mssql-travis.xml | 41 ------------------- ...l-travis.xml => phpunit-mysqli-travis.xml} | 0 travis/phpunit-postgres-travis.xml | 2 +- travis/setup-database.sh | 10 +++-- travis/setup-ldap.sh | 7 ++-- travis/setup-phpbb.sh | 10 +++++ travis/setup-webserver.sh | 21 ++-------- 8 files changed, 27 insertions(+), 70 deletions(-) delete mode 100644 travis/phpunit-mssql-travis.xml rename travis/{phpunit-mysql-travis.xml => phpunit-mysqli-travis.xml} (100%) diff --git a/travis/ldap/slapd.conf b/travis/ldap/slapd.conf index 9f6aa980f7..5fce95cee2 100644 --- a/travis/ldap/slapd.conf +++ b/travis/ldap/slapd.conf @@ -4,13 +4,13 @@ include /etc/ldap/schema/cosine.schema include /etc/ldap/schema/inetorgperson.schema include /etc/ldap/schema/nis.schema -pidfile /var/tmp/slapd/slapd.pid -argsfile /var/tmp/slapd/slapd.args +pidfile /tmp/slapd/slapd.pid +argsfile /tmp/slapd/slapd.args modulepath /usr/lib/openldap database ldif -directory /var/tmp/slapd +directory /tmp/slapd suffix "dc=example,dc=com" rootdn "cn=admin,dc=example,dc=com" diff --git a/travis/phpunit-mssql-travis.xml b/travis/phpunit-mssql-travis.xml deleted file mode 100644 index 37c1deae2d..0000000000 --- a/travis/phpunit-mssql-travis.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - ../tests - ../tests/functional - ../tests/lint_test.php - - - ../tests/functional - - - - - - slow - - - - - - - - - - - - - - - - diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysqli-travis.xml similarity index 100% rename from travis/phpunit-mysql-travis.xml rename to travis/phpunit-mysqli-travis.xml diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml index 2648f27bef..3d8376bda1 100644 --- a/travis/phpunit-postgres-travis.xml +++ b/travis/phpunit-postgres-travis.xml @@ -32,7 +32,7 @@ - + diff --git a/travis/setup-database.sh b/travis/setup-database.sh index 479e17f592..b581ddfccb 100755 --- a/travis/setup-database.sh +++ b/travis/setup-database.sh @@ -14,7 +14,6 @@ set -x DB=$1 TRAVIS_PHP_VERSION=$2 NOTESTS=$3 -MYISAM=$4 if [ "$NOTESTS" == '1' ] then @@ -27,7 +26,12 @@ then psql -c 'create database phpbb_tests;' -U postgres fi -if [ "$MYISAM" == '1' ] +if [ "$TRAVIS_PHP_VERSION" == "5.6" -a "$DB" == "mysqli" ] then - mysql -h 127.0.0.1 -u root -e 'SET GLOBAL storage_engine=MyISAM;' + mysql -e 'SET GLOBAL storage_engine=MyISAM;' +fi + +if [ "$DB" == "mysqli" -o "$DB" == "mariadb" ] +then + mysql -e 'create database IF NOT EXISTS phpbb_tests;' fi diff --git a/travis/setup-ldap.sh b/travis/setup-ldap.sh index a5cbd3c0e1..9be816d77d 100755 --- a/travis/setup-ldap.sh +++ b/travis/setup-ldap.sh @@ -15,10 +15,9 @@ SLOWTESTS=$1 if [ "$SLOWTESTS" == '1' ] then - sudo apt-get -y install ldap-utils slapd - mkdir /var/tmp/slapd - cp travis/ldap/slapd.conf /var/tmp/slapd/slapd.conf - slapd -d 256 -d 128 -f /var/tmp/slapd/slapd.conf -h ldap://localhost:3389 & + sudo apt-get -y install ldap-utils slapd php-ldap + mkdir /tmp/slapd + slapd -f travis/ldap/slapd.conf -h ldap://localhost:3389 & sleep 3 ldapadd -h localhost:3389 -D "cn=admin,dc=example,dc=com" -w adminadmin -f travis/ldap/base.ldif fi diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh index a6e51b5ed9..208b715dfe 100755 --- a/travis/setup-phpbb.sh +++ b/travis/setup-phpbb.sh @@ -22,11 +22,21 @@ then travis/setup-unbuffer.sh fi +if [ "$DB" == "mariadb" ] +then + travis/setup-mariadb.sh +fi + if [ "$MYSQL8" == '1' ] then travis/setup-mysql8.sh fi +if [ "$NOTESTS" != '1' ] +then + travis/setup-php-extensions.sh +fi + if [ "$NOTESTS" != '1' ] then travis/setup-webserver.sh diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh index af6fccfe53..68bcd6ac00 100755 --- a/travis/setup-webserver.sh +++ b/travis/setup-webserver.sh @@ -12,7 +12,7 @@ set -e set -x sudo apt-get update -sudo apt-get install -y nginx coreutils +sudo apt-get install -y nginx realpath sudo service nginx stop @@ -25,28 +25,13 @@ APP_SOCK=$(realpath "$DIR")/php-app.sock NGINX_PHP_CONF="$DIR/nginx-php.conf" # php-fpm -PHP_FPM_BIN="/usr/sbin/php-fpm$PHP_VERSION" +PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm" PHP_FPM_CONF="$DIR/php-fpm.conf" -if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" == '8.1' ] && [ -f "/usr/bin/php-fpm" ] -then - PHP_FPM_BIN="/usr/bin/php-fpm" -fi - -if [ ! -f $PHP_FPM_BIN ] && [ "$PHP_VERSION" != '8.1' ] -then - sudo apt-get install php$PHP_VERSION-fpm php$PHP_VERSION-cli php$PHP_VERSION-dom \ - php$PHP_VERSION-curl php$PHP_VERSION-xml php$PHP_VERSION-mbstring \ - php$PHP_VERSION-zip php$PHP_VERSION-mysql php$PHP_VERSION-sqlite3 \ - php$PHP_VERSION-intl php$PHP_VERSION-gd php$PHP_VERSION-pgsql - sudo service php$PHP_VERSION-fpm start - sudo service php$PHP_VERSION-fpm status -fi - echo " [global] - [ci] + [travis] user = $USER group = $USER listen = $APP_SOCK