aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-12-05 14:29:46 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2019-01-23 13:28:24 +0100
commit6df8b9c6a90de333c9e24a49615fffa9e350e382 (patch)
tree21a855182606852214e74583ec6c8e6289cc75c7
parent842af5c3571c5318ae4e1c81dc52457fbf6d3f21 (diff)
downloadwallabag-6df8b9c6a90de333c9e24a49615fffa9e350e382.tar.gz
wallabag-6df8b9c6a90de333c9e24a49615fffa9e350e382.tar.zst
wallabag-6df8b9c6a90de333c9e24a49615fffa9e350e382.zip
Fix PG & Travis drop/create database
-rw-r--r--.editorconfig2
-rw-r--r--.travis.yml10
-rwxr-xr-xGNUmakefile6
3 files changed, 13 insertions, 5 deletions
diff --git a/.editorconfig b/.editorconfig
index 6553d30f..14044044 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -13,5 +13,5 @@ insert_final_newline = true
13indent_style = space 13indent_style = space
14indent_size = 2 14indent_size = 2
15 15
16[Makefile] 16[*akefile]
17indent_style = tab 17indent_style = tab
diff --git a/.travis.yml b/.travis.yml
index 0ca1e192..c660bb5e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,15 +51,17 @@ install:
51 51
52before_script: 52before_script:
53 - PHP=$TRAVIS_PHP_VERSION 53 - PHP=$TRAVIS_PHP_VERSION
54 - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; 54 - echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
55 # xdebug isn't enable for PHP 7.1 55 - phpenv config-rm xdebug.ini || echo "xdebug not available"
56 - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi
57 - composer self-update --no-progress 56 - composer self-update --no-progress
58 57
59script: 58script:
60 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist 59 - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist
60
61 - echo "travis_fold:start:prepare" 61 - echo "travis_fold:start:prepare"
62 - make prepare DB=$DB 62 # custom "prepare" for PG because the database should be created with a different user (see "before_script")
63 - if [[ ! $DB = pgsql ]]; then make prepare DB=$DB; fi;
64 - if [[ $DB = pgsql ]]; then make prepare-travis-pg DB=$DB; fi;
63 - echo "travis_fold:end:prepare" 65 - echo "travis_fold:end:prepare"
64 66
65 - make fixtures 67 - make fixtures
diff --git a/GNUmakefile b/GNUmakefile
index a04468cb..d8c16202 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -25,6 +25,12 @@ run: ## Run the wallabag built-in server
25build: ## Run webpack 25build: ## Run webpack
26 @npm run build:$(ENV) 26 @npm run build:$(ENV)
27 27
28prepare-travis-pg: ## Custom prepare for Travis & Postgres (do not drop/create the database)
29ifdef DB
30 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
31endif
32 php bin/console doctrine:migrations:migrate --no-interaction --env=test
33
28prepare: clean ## Prepare database for testsuite 34prepare: clean ## Prepare database for testsuite
29ifdef DB 35ifdef DB
30 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml 36 cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml