mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +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:
|
db:
|
||||||
- mysql:5.6
|
- mysql:5.6
|
||||||
- mysql:5.7
|
- mysql:5.7
|
||||||
- mysql:8.0
|
# - mysql:8.0
|
||||||
- postgres:9.5
|
# - postgres:9.5
|
||||||
- postgres:9.6
|
# - postgres:9.6
|
||||||
- postgres:10
|
# - postgres:10
|
||||||
- postgres:11
|
# - postgres:11
|
||||||
- postgres:12
|
# - postgres:12
|
||||||
- postgres:13
|
# - postgres:13
|
||||||
- sqlite3
|
# - sqlite3
|
||||||
|
|
||||||
name: PHP${{ matrix.php }} - ${{ matrix.db }}
|
name: PHP${{ matrix.php }} - ${{ matrix.db }}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
if: startsWith(${{ matrix.db }}, 'mysql')
|
|
||||||
image: ${{ matrix.db }}
|
image: ${{ matrix.db }}
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||||
|
MYSQL_DATABASE: phpbb_tests
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
options: >-
|
options: >-
|
||||||
|
@ -46,18 +46,18 @@ jobs:
|
||||||
--health-timeout=5s
|
--health-timeout=5s
|
||||||
--health-retries=3
|
--health-retries=3
|
||||||
|
|
||||||
postgres:
|
# postgres:
|
||||||
if: startsWith(${{ matrix.db }}, 'postgres')
|
# if: startsWith(${{ matrix.db }}, 'postgres')
|
||||||
image: ${{ matrix.db }}
|
# image: ${{ matrix.db }}
|
||||||
env:
|
# env:
|
||||||
POSTGRES_PASSWORD: postgres
|
# POSTGRES_PASSWORD: postgres
|
||||||
ports:
|
# ports:
|
||||||
- 5432:5432
|
# - 5432:5432
|
||||||
options: >-
|
# options: >-
|
||||||
--health-cmd pg_isready
|
# --health-cmd pg_isready
|
||||||
--health-interval 10s
|
# --health-interval 10s
|
||||||
--health-timeout 5s
|
# --health-timeout 5s
|
||||||
--health-retries 5
|
# --health-retries 5
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
options: >-
|
options: >-
|
||||||
|
@ -78,14 +78,21 @@ jobs:
|
||||||
db=$(echo "${MATRIX_DB%%:*}")
|
db=$(echo "${MATRIX_DB%%:*}")
|
||||||
echo "::set-output name=db::$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
|
- name: Setup environment for phpBB
|
||||||
env:
|
env:
|
||||||
DB: ${{steps.database-type.outputs.db}}
|
DB: ${{steps.database-type.outputs.db}}
|
||||||
PHP_VERSION: ${{ matrix.php }}
|
CI_PHP_VERSION: ${{ matrix.php }}
|
||||||
NOTESTS: 0
|
NOTESTS: 0
|
||||||
MYSQL8: ${{ matrix.db }} == 'mysql:8.0'
|
MYSQL8: ${{ matrix.db }} == 'mysql:8.0'
|
||||||
run: |
|
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
|
- name: Setup database
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -26,12 +26,12 @@ then
|
||||||
psql -c 'create database phpbb_tests;' -U postgres
|
psql -c 'create database phpbb_tests;' -U postgres
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$TRAVIS_PHP_VERSION" == "5.6" -a "$DB" == "mysqli" ]
|
if [ "$TRAVIS_PHP_VERSION" == "5.6" -a "$DB" == "mysql" ]
|
||||||
then
|
then
|
||||||
mysql -e 'SET GLOBAL storage_engine=MyISAM;'
|
mysql -e 'SET GLOBAL storage_engine=MyISAM;'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DB" == "mysqli" -o "$DB" == "mariadb" ]
|
if [ "$DB" == "mariadb" ]
|
||||||
then
|
then
|
||||||
mysql -e 'create database IF NOT EXISTS phpbb_tests;'
|
mysql -e 'create database IF NOT EXISTS phpbb_tests;'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -32,11 +32,6 @@ then
|
||||||
travis/setup-mysql8.sh
|
travis/setup-mysql8.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$NOTESTS" != '1' ]
|
|
||||||
then
|
|
||||||
travis/setup-php-extensions.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$NOTESTS" != '1' ]
|
if [ "$NOTESTS" != '1' ]
|
||||||
then
|
then
|
||||||
travis/setup-webserver.sh
|
travis/setup-webserver.sh
|
||||||
|
|
|
@ -12,7 +12,7 @@ set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y nginx realpath
|
sudo apt-get install -y nginx coreutils
|
||||||
|
|
||||||
sudo service nginx stop
|
sudo service nginx stop
|
||||||
|
|
||||||
|
@ -25,13 +25,13 @@ APP_SOCK=$(realpath "$DIR")/php-app.sock
|
||||||
NGINX_PHP_CONF="$DIR/nginx-php.conf"
|
NGINX_PHP_CONF="$DIR/nginx-php.conf"
|
||||||
|
|
||||||
# php-fpm
|
# 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"
|
PHP_FPM_CONF="$DIR/php-fpm.conf"
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
[global]
|
[global]
|
||||||
|
|
||||||
[travis]
|
[ci]
|
||||||
user = $USER
|
user = $USER
|
||||||
group = $USER
|
group = $USER
|
||||||
listen = $APP_SOCK
|
listen = $APP_SOCK
|
||||||
|
|
Loading…
Add table
Reference in a new issue