diff options
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml index ce50fcc4..39306343 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -48,6 +48,14 @@ branches: | |||
48 | except: | 48 | except: |
49 | - legacy | 49 | - legacy |
50 | 50 | ||
51 | before_install: | ||
52 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | ||
53 | |||
54 | install: | ||
55 | - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi; | ||
56 | - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi; | ||
57 | - if [[ $ASSETS = build ]]; then yarn install; fi; | ||
58 | |||
51 | before_script: | 59 | before_script: |
52 | - PHP=$TRAVIS_PHP_VERSION | 60 | - PHP=$TRAVIS_PHP_VERSION |
53 | - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; | 61 | - if [[ ! $PHP = hhvm* ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi; |
@@ -55,17 +63,17 @@ before_script: | |||
55 | - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi | 63 | - if [[ ! $PHP = hhvm* ]]; then phpenv config-rm xdebug.ini || echo "xdebug not available"; fi |
56 | - composer self-update --no-progress | 64 | - composer self-update --no-progress |
57 | - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; | 65 | - if [[ $DB = pgsql ]]; then psql -c 'create database wallabag_test;' -U postgres; fi; |
58 | 66 | # increase swap to avoid "proc_open(): fork failed - Cannot allocate memory" | |
59 | install: | 67 | # this should be removed when no more PHP 5 build will be defined |
60 | - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi; | 68 | - sudo swapon -s |
61 | - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi; | 69 | - sudo fallocate -l 4G /swapfile |
62 | - if [[ $ASSETS = build ]]; then yarn install; fi; | 70 | - sudo chmod 600 /swapfile |
63 | 71 | - sudo mkswap /swapfile | |
64 | before_install: | 72 | - sudo swapon /swapfile |
65 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | 73 | - sudo swapon -s |
66 | 74 | ||
67 | script: | 75 | script: |
68 | - COMPOSER_MEMORY_LIMIT=-1 travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist | 76 | - travis_wait bash composer install -o --no-interaction --no-progress --prefer-dist |
69 | - echo "travis_fold:start:prepare" | 77 | - echo "travis_fold:start:prepare" |
70 | - make prepare DB=$DB | 78 | - make prepare DB=$DB |
71 | - echo "travis_fold:end:prepare" | 79 | - echo "travis_fold:end:prepare" |