diff options
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml index eb409533..39306343 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -1,17 +1,14 @@ | |||
1 | language: php | 1 | language: php |
2 | 2 | ||
3 | services: | 3 | services: |
4 | - rabbitmq | 4 | - rabbitmq |
5 | - redis | 5 | - redis |
6 | |||
7 | # faster builds on docker-container setup | ||
8 | sudo: false | ||
9 | 6 | ||
10 | # used for HHVM | 7 | # used for HHVM |
11 | addons: | 8 | addons: |
12 | apt: | 9 | apt: |
13 | packages: | 10 | packages: |
14 | - tidy | 11 | - tidy |
15 | 12 | ||
16 | # cache vendor dirs | 13 | # cache vendor dirs |
17 | cache: | 14 | cache: |
@@ -51,6 +48,14 @@ branches: | |||
51 | except: | 48 | except: |
52 | - legacy | 49 | - legacy |
53 | 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 | |||
54 | before_script: | 59 | before_script: |
55 | - PHP=$TRAVIS_PHP_VERSION | 60 | - PHP=$TRAVIS_PHP_VERSION |
56 | - 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; |
@@ -58,17 +63,17 @@ before_script: | |||
58 | - 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 |
59 | - composer self-update --no-progress | 64 | - composer self-update --no-progress |
60 | - 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; |
61 | 66 | # increase swap to avoid "proc_open(): fork failed - Cannot allocate memory" | |
62 | install: | 67 | # this should be removed when no more PHP 5 build will be defined |
63 | - if [[ $ASSETS = build ]]; then source ~/.nvm/nvm.sh && nvm install 6.10; fi; | 68 | - sudo swapon -s |
64 | - if [[ $ASSETS = build ]]; then npm install -g yarn@latest; fi; | 69 | - sudo fallocate -l 4G /swapfile |
65 | - if [[ $ASSETS = build ]]; then yarn install; fi; | 70 | - sudo chmod 600 /swapfile |
66 | 71 | - sudo mkswap /swapfile | |
67 | before_install: | 72 | - sudo swapon /swapfile |
68 | - if [[ $TRAVIS_REPO_SLUG = wallabag/wallabag ]]; then cp .composer-auth.json ~/.composer/auth.json; fi; | 73 | - sudo swapon -s |
69 | 74 | ||
70 | script: | 75 | script: |
71 | - 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 |
72 | - echo "travis_fold:start:prepare" | 77 | - echo "travis_fold:start:prepare" |
73 | - make prepare DB=$DB | 78 | - make prepare DB=$DB |
74 | - echo "travis_fold:end:prepare" | 79 | - echo "travis_fold:end:prepare" |