You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

218 lines
5.9 KiB

  1. pipeline:
  2. eslint:
  3. image: nextcloudci/eslint:eslint-1
  4. commands:
  5. - ./run-eslint.sh
  6. when:
  7. matrix:
  8. TESTS: eslint
  9. stylelint:
  10. image: nextcloudci/stylelint:stylelint-1
  11. commands:
  12. - ./run-stylelint.sh
  13. when:
  14. matrix:
  15. TESTS: stylelint
  16. check-app-compatbility:
  17. image: nextcloudci/php7.0:php7.0-2
  18. environment:
  19. - APP_NAME=spreed
  20. - CORE_BRANCH=master
  21. - DB=sqlite
  22. commands:
  23. # Pre-setup steps
  24. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  25. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  26. - cd ../server
  27. # Code checker
  28. - ./occ app:check-code $APP_NAME
  29. - cd apps/$APP_NAME/
  30. when:
  31. matrix:
  32. TESTS: check-app-compatbility
  33. syntax-php7.0:
  34. image: nextcloudci/php7.0:php7.0-2
  35. environment:
  36. - APP_NAME=spreed
  37. - CORE_BRANCH=master
  38. - DB=sqlite
  39. commands:
  40. # Pre-setup steps
  41. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  42. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  43. - cd ../server
  44. - composer install
  45. - ./lib/composer/bin/parallel-lint apps/$APP_NAME/
  46. when:
  47. matrix:
  48. TESTS: syntax-php7.0
  49. signed-off-check:
  50. image: nextcloudci/php7.0:php7.0-2
  51. environment:
  52. - APP_NAME=spreed
  53. - CORE_BRANCH=master
  54. - DB=sqlite
  55. commands:
  56. # Pre-setup steps
  57. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  58. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  59. - cd ../server
  60. - php ./build/signed-off-checker.php
  61. when:
  62. matrix:
  63. TESTS: signed-off-check
  64. php7.0:
  65. image: nextcloudci/php7.0:php7.0-2
  66. environment:
  67. - APP_NAME=spreed
  68. - CORE_BRANCH=master
  69. - DB=sqlite
  70. commands:
  71. # Pre-setup steps
  72. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  73. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  74. - cd ../server/
  75. - ./occ app:enable $APP_NAME
  76. - cd apps/$APP_NAME
  77. # Run phpunit tests
  78. - cd tests/php/
  79. - phpunit --configuration phpunit.xml
  80. when:
  81. matrix:
  82. TESTS: php7.0
  83. php7.1:
  84. image: nextcloudci/php7.1:php7.1-15
  85. environment:
  86. - APP_NAME=spreed
  87. - CORE_BRANCH=master
  88. - DB=sqlite
  89. commands:
  90. # Pre-setup steps
  91. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  92. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  93. - cd ../server/
  94. - ./occ app:enable $APP_NAME
  95. - cd apps/$APP_NAME
  96. # Run phpunit tests
  97. - cd tests/php/
  98. - phpunit --configuration phpunit.xml
  99. when:
  100. matrix:
  101. TESTS: php7.1
  102. php7.2:
  103. image: nextcloudci/php7.2:php7.2-9
  104. environment:
  105. - APP_NAME=spreed
  106. - CORE_BRANCH=master
  107. - DB=sqlite
  108. commands:
  109. # Pre-setup steps
  110. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  111. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  112. - cd ../server/
  113. - ./occ app:enable $APP_NAME
  114. - cd apps/$APP_NAME
  115. # Run phpunit tests
  116. - cd tests/php/
  117. - phpunit --configuration phpunit.xml
  118. when:
  119. matrix:
  120. TESTS: php7.2
  121. php7.1-integration:
  122. image: nextcloudci/php7.1:php7.1-15
  123. environment:
  124. - APP_NAME=spreed
  125. - CORE_BRANCH=master
  126. commands:
  127. # Pre-setup steps
  128. - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
  129. - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
  130. - cd ../server/
  131. - ./occ app:enable $APP_NAME
  132. - cd apps/$APP_NAME
  133. # Run integration tests
  134. - cd tests/integration/
  135. - bash run.sh
  136. when:
  137. matrix:
  138. TESTS: php7.1-integration
  139. jsunit:
  140. image: nextcloudci/jsunit:jsunit-5
  141. commands:
  142. - unset PHANTOMJS_BIN
  143. - npm install
  144. - node_modules/karma/bin/karma start --single-run
  145. when:
  146. matrix:
  147. TESTS: jsunit
  148. acceptance-conversation:
  149. image: nextcloudci/acceptance-php7.1:acceptance-php7.1-2
  150. commands:
  151. # Pre-setup steps
  152. - git clone --depth 1 -b master https://github.com/nextcloud/server ../server
  153. - cp -R . ../server/apps/spreed
  154. - cd ../server
  155. - git submodule update --init
  156. - ln --symbolic `pwd` /var/www/html
  157. # Run acceptance tests
  158. - tests/acceptance/run-local.sh --acceptance-tests-dir apps/spreed/tests/acceptance --timeout-multiplier 10 --nextcloud-server-domain acceptance-conversation --selenium-server selenium:4444 allow-git-repository-modifications features/conversation.feature
  159. when:
  160. matrix:
  161. TESTS-ACCEPTANCE: conversation
  162. matrix:
  163. include:
  164. - TESTS: eslint
  165. - TESTS: stylelint
  166. - TESTS: check-app-compatbility
  167. - TESTS: syntax-php7.0
  168. - TESTS: signed-off-check
  169. - TESTS: php7.0
  170. - TESTS: php7.1
  171. - TESTS: php7.2
  172. - TESTS: php7.1-integration
  173. DB: sqlite
  174. - TESTS: php7.1-integration
  175. DB: mysql
  176. DATABASEHOST: mysql-5.7
  177. - TESTS: php7.1-integration
  178. DB: pgsql
  179. DATABASEHOST: postgres-10
  180. - TESTS: jsunit
  181. - TESTS: acceptance
  182. TESTS-ACCEPTANCE: conversation
  183. services:
  184. mysql-5.7:
  185. image: mysql:5.7
  186. environment:
  187. - MYSQL_ROOT_PASSWORD=owncloud
  188. - MYSQL_USER=oc_autotest
  189. - MYSQL_PASSWORD=owncloud
  190. - MYSQL_DATABASE=oc_autotest
  191. when:
  192. matrix:
  193. DATABASEHOST: mysql-5.7
  194. postgres-10:
  195. image: postgres:10
  196. environment:
  197. - POSTGRES_USER=oc_autotest
  198. - POSTGRES_PASSWORD=
  199. when:
  200. matrix:
  201. DATABASEHOST: postgres-10
  202. selenium:
  203. image: selenium/standalone-firefox:2.53.1-beryllium
  204. environment:
  205. # Reduce default log level for Selenium server (INFO) as it is too
  206. # verbose.
  207. - JAVA_OPTS=-Dselenium.LOGGER.level=WARNING
  208. when:
  209. matrix:
  210. TESTS: acceptance