]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix PG & Travis drop/create database
authorJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 5 Dec 2018 13:29:46 +0000 (14:29 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Wed, 23 Jan 2019 12:28:24 +0000 (13:28 +0100)
.editorconfig
.travis.yml
GNUmakefile

index 6553d30fd52c80bfca71daa162b6812066770126..140440443dbf9e8fdaaf507dbe401455507d8beb 100644 (file)
@@ -13,5 +13,5 @@ insert_final_newline = true
 indent_style = space
 indent_size = 2
 
-[Makefile]
+[*akefile]
 indent_style = tab
index 0ca1e192c49b0d333623b5e78006d6320fb61964..c660bb5e529d8f42dce6155b9fa9bc8191f0285f 100644 (file)
@@ -51,15 +51,17 @@ install:
 
 before_script:
     - PHP=$TRAVIS_PHP_VERSION
-    - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
-    # xdebug isn't enable for PHP 7.1
-    - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
+    - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
+    - phpenv config-rm xdebug.ini || echo "xdebug not available"
     - composer self-update --no-progress
 
 script:
     - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
+
     - 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"
 
     - make fixtures
index a04468cb1a6a9704440aadb7eb27fdaef0f22fee..d8c16202848e091db22d4e65409125e443db0692 100755 (executable)
@@ -25,6 +25,12 @@ run: ## Run the wallabag built-in server
 build: ## Run webpack
        @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
 ifdef DB
        cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml