Fix PG & Travis drop/create database
This commit is contained in:
parent
842af5c357
commit
6df8b9c6a9
@ -13,5 +13,5 @@ insert_final_newline = true
|
|||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
||||||
[Makefile]
|
[*akefile]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
|
10
.travis.yml
10
.travis.yml
@ -51,15 +51,17 @@ install:
|
|||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- PHP=$TRAVIS_PHP_VERSION
|
- PHP=$TRAVIS_PHP_VERSION
|
||||||
- if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
|
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||||
# xdebug isn't enable for PHP 7.1
|
- phpenv config-rm xdebug.ini || echo "xdebug not available"
|
||||||
- if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
|
|
||||||
- composer self-update --no-progress
|
- composer self-update --no-progress
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
- travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
|
||||||
|
|
||||||
- echo "travis_fold:start:prepare"
|
- echo "travis_fold:start:prepare"
|
||||||
- make prepare DB=$DB
|
# custom "prepare" for PG because the database should be created with a different user (see "before_script")
|
||||||
|
- if [[ ! $DB = pgsql ]]; then make prepare DB=$DB; fi;
|
||||||
|
- if [[ $DB = pgsql ]]; then make prepare-travis-pg DB=$DB; fi;
|
||||||
- echo "travis_fold:end:prepare"
|
- echo "travis_fold:end:prepare"
|
||||||
|
|
||||||
- make fixtures
|
- make fixtures
|
||||||
|
@ -25,6 +25,12 @@ run: ## Run the wallabag built-in server
|
|||||||
build: ## Run webpack
|
build: ## Run webpack
|
||||||
@npm run build:$(ENV)
|
@npm run build:$(ENV)
|
||||||
|
|
||||||
|
prepare-travis-pg: ## Custom prepare for Travis & Postgres (do not drop/create the database)
|
||||||
|
ifdef DB
|
||||||
|
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
||||||
|
endif
|
||||||
|
php bin/console doctrine:migrations:migrate --no-interaction --env=test
|
||||||
|
|
||||||
prepare: clean ## Prepare database for testsuite
|
prepare: clean ## Prepare database for testsuite
|
||||||
ifdef DB
|
ifdef DB
|
||||||
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user