mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/16659] Limit tests to mysql for now
PHPBB3-16659
This commit is contained in:
parent
cbf98a2d7d
commit
ba75aa9d0c
4 changed files with 35 additions and 33 deletions
53
.github/workflows/tests.yml
vendored
53
.github/workflows/tests.yml
vendored
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue