nextcloud-raw/ .travis.yml
65 lines
1.6 KiB

  1. sudo: false
  2. dist: trusty
  3. language: php
  4. php:
  5. - 5.6
  6. - 7
  7. - 7.1
  8. env:
  9. global:
  10. - CORE_BRANCH=stable14
  11. matrix:
  12. - DB=pgsql
  13. matrix:
  14. allow_failures:
  15. - env: DB=pgsql CORE_BRANCH=master
  16. include:
  17. - php: 5.6
  18. env: DB=sqlite
  19. - php: 5.6
  20. env: DB=mysql
  21. - php: 5.6
  22. env: DB=pgsql CORE_BRANCH=master
  23. fast_finish: true
  24. before_install:
  25. # enable a display for running JavaScript tests
  26. - export DISPLAY=:99.0
  27. - sh -e /etc/init.d/xvfb start
  28. - nvm install 8
  29. - npm install -g npm@latest
  30. - make
  31. - make appstore
  32. # install core
  33. - cd ../
  34. - git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH nextcloud
  35. - mv "$TRAVIS_BUILD_DIR" nextcloud/apps/raw
  36. before_script:
  37. - if [[ "$DB" == 'pgsql' ]]; then createuser -U travis -s oc_autotest; fi
  38. - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e 'create database oc_autotest;'; fi
  39. - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi
  40. - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"; fi
  41. - cd nextcloud
  42. - mkdir data
  43. - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
  44. - ./occ app:enable raw
  45. - php -S localhost:8080 &
  46. - cd apps/raw
  47. script:
  48. - make test
  49. after_failure:
  50. - cat ../../data/nextcloud.log
  51. addons:
  52. firefox: 'latest'
  53. mariadb: '10.1'
  54. services:
  55. - postgresql
  56. - mariadb