diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4e88c6a958..6e84061879 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,23 +21,23 @@ jobs: db: - mysql:5.6 - mysql:5.7 - - mysql:8.0 - - postgres:9.5 - - postgres:9.6 - - postgres:10 - - postgres:11 - - postgres:12 - - postgres:13 - - sqlite3 +# - mysql:8.0 +# - postgres:9.5 +# - postgres:9.6 +# - postgres:10 +# - postgres:11 +# - postgres:12 +# - postgres:13 +# - sqlite3 name: PHP${{ matrix.php }} - ${{ matrix.db }} services: mysql: - if: startsWith(${{ matrix.db }}, 'mysql') image: ${{ matrix.db }} env: MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: phpbb_tests ports: - 3306:3306 options: >- @@ -46,18 +46,18 @@ jobs: --health-timeout=5s --health-retries=3 - postgres: - if: startsWith(${{ matrix.db }}, 'postgres') - image: ${{ matrix.db }} - env: - POSTGRES_PASSWORD: postgres - ports: - - 5432:5432 - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 +# postgres: +# if: startsWith(${{ matrix.db }}, 'postgres') +# image: ${{ matrix.db }} +# env: +# POSTGRES_PASSWORD: postgres +# ports: +# - 5432:5432 +# options: >- +# --health-cmd pg_isready +# --health-interval 10s +# --health-timeout 5s +# --health-retries 5 redis: image: redis options: >- @@ -78,14 +78,21 @@ jobs: db=$(echo "${MATRIX_DB%%:*}") echo "::set-output name=db::$db" + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extension: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, pdo_mysqli, intl, gd, exif, iconv + coverage: none + - name: Setup environment for phpBB env: DB: ${{steps.database-type.outputs.db}} - PHP_VERSION: ${{ matrix.php }} + CI_PHP_VERSION: ${{ matrix.php }} NOTESTS: 0 MYSQL8: ${{ matrix.db }} == 'mysql:8.0' run: | - travis/setup-phpbb.sh $DB PHP_VERSION ${NOTESTS:-0} ${MYSQL8:-0} + travis/setup-phpbb.sh $DB CI_PHP_VERSION ${NOTESTS:-0} ${MYSQL8:-0} - name: Setup database env: diff --git a/travis/setup-database.sh b/travis/setup-database.sh index b581ddfccb..602d55678e 100755 --- a/travis/setup-database.sh +++ b/travis/setup-database.sh @@ -26,12 +26,12 @@ then psql -c 'create database phpbb_tests;' -U postgres fi -if [ "$TRAVIS_PHP_VERSION" == "5.6" -a "$DB" == "mysqli" ] +if [ "$TRAVIS_PHP_VERSION" == "5.6" -a "$DB" == "mysql" ] then mysql -e 'SET GLOBAL storage_engine=MyISAM;' fi -if [ "$DB" == "mysqli" -o "$DB" == "mariadb" ] +if [ "$DB" == "mariadb" ] then mysql -e 'create database IF NOT EXISTS phpbb_tests;' fi diff --git a/travis/setup-phpbb.sh b/travis/setup-phpbb.sh index 208b715dfe..7c089d76db 100755 --- a/travis/setup-phpbb.sh +++ b/travis/setup-phpbb.sh @@ -32,11 +32,6 @@ 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 68bcd6ac00..35cdb0ebf4 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 realpath +sudo apt-get install -y nginx coreutils sudo service nginx stop @@ -25,13 +25,13 @@ APP_SOCK=$(realpath "$DIR")/php-app.sock NGINX_PHP_CONF="$DIR/nginx-php.conf" # php-fpm -PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm" +PHP_FPM_BIN="/usr/sbin/php-fpm$CI_PHP_VERSION" PHP_FPM_CONF="$DIR/php-fpm.conf" echo " [global] - [travis] + [ci] user = $USER group = $USER listen = $APP_SOCK