mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 08:14:04 +02:00
Merge pull request #1645 from Icinga/travis
travis: Split phpcs to a single matrix element
This commit is contained in:
commit
2de62be74d
17
.travis.yml
17
.travis.yml
@ -18,18 +18,25 @@ cache:
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- env: CHECK=phpcs
|
||||
php: nightly # Note: will be allowed failure
|
||||
- env: CHECK=phpcs
|
||||
php: '7.0'
|
||||
- env: CHECK=phpcs
|
||||
php: '5.4'
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
env:
|
||||
- DB=mysql DIRECTOR_TESTDB_RES="Director MySQL TestDB" DIRECTOR_TESTDB="director_test"
|
||||
- DB=pgsql DIRECTOR_TESTDB_RES="Director PostgreSQL TestDB" DIRECTOR_TESTDB="director_test"
|
||||
- CHECK=phpunit DB=mysql DIRECTOR_TESTDB_RES="Director MySQL TestDB" DIRECTOR_TESTDB="director_test"
|
||||
- CHECK=phpunit DB=pgsql DIRECTOR_TESTDB_RES="Director PostgreSQL TestDB" DIRECTOR_TESTDB="director_test"
|
||||
DIRECTOR_TESTDB_USER="director_test"
|
||||
|
||||
before_script:
|
||||
- ./test/setup_vendor.sh
|
||||
- ./test/travis-prepare.sh
|
||||
- '[ "$CHECK" != phpunit ] || ./test/travis-prepare.sh'
|
||||
|
||||
script:
|
||||
- php vendor/phpcs.phar
|
||||
- php vendor/phpunit.phar --testdox || php vendor/phpunit.phar --verbose
|
||||
- '[ "$CHECK" != phpcs ] || php vendor/phpcs.phar'
|
||||
- '[ "$CHECK" != phpunit ] || php vendor/phpunit.phar --testdox || php vendor/phpunit.phar --verbose'
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
set -ex
|
||||
|
||||
: "${DIRECTOR_TESTDB:=director_test}"
|
||||
|
||||
psql_cmd() {
|
||||
psql -U postgres ${DIRECTOR_TESTDB} -q -c "$@"
|
||||
}
|
||||
@ -9,6 +11,8 @@ psql_cmd() {
|
||||
if [ "$DB" = mysql ]; then
|
||||
mysql -u root -e "CREATE DATABASE ${DIRECTOR_TESTDB};"
|
||||
elif [ "$DB" = pgsql ]; then
|
||||
: "${DIRECTOR_TESTDB_USER:=director_test}"
|
||||
|
||||
psql -U postgres postgres -q -c "CREATE DATABASE ${DIRECTOR_TESTDB} WITH ENCODING 'UTF8';"
|
||||
psql_cmd "CREATE USER ${DIRECTOR_TESTDB_USER} WITH PASSWORD 'testing';"
|
||||
psql_cmd "GRANT ALL PRIVILEGES ON DATABASE ${DIRECTOR_TESTDB} TO ${DIRECTOR_TESTDB_USER};"
|
||||
|
Loading…
x
Reference in New Issue
Block a user