.drone.yml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. pipeline:
  2. clone:
  3. image: plugins/git
  4. depth: 1
  5. jsunit:
  6. image: nextcloudci/jsunit:1.0.6
  7. commands:
  8. - ./autotest-js.sh
  9. when:
  10. matrix:
  11. TESTS: jsunit
  12. check-autoloader:
  13. image: nextcloudci/php7.0:php7.0-2
  14. commands:
  15. - bash ./build/autoloaderchecker.sh
  16. when:
  17. matrix:
  18. TESTS: check-autoloader
  19. app-check-code:
  20. image: nextcloudci/php7.0:php7.0-2
  21. commands:
  22. - ./occ app:check-code admin_audit
  23. - ./occ app:check-code comments
  24. - ./occ app:check-code federation
  25. - ./occ app:check-code workflowengine
  26. when:
  27. matrix:
  28. TESTS: app-check-code
  29. signed-off-check:
  30. image: nextcloudci/php7.0:php7.0-2
  31. commands:
  32. - php ./build/signed-off-checker.php
  33. when:
  34. matrix:
  35. TESTS: signed-off-check
  36. syntax-php5.6:
  37. image: nextcloudci/php5.6:php5.6-2
  38. commands:
  39. - composer install
  40. - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
  41. when:
  42. matrix:
  43. TESTS: syntax-php5.6
  44. syntax-php7.0:
  45. image: nextcloudci/php7.0:php7.0-2
  46. commands:
  47. - composer install
  48. - ./lib/composer/bin/parallel-lint --exclude lib/composer/jakub-onderka/ --exclude 3rdparty/symfony/polyfill-php70/Resources/stubs/ --exclude 3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/ --exclude 3rdparty/paragonie/random_compat/lib/ --exclude lib/composer/composer/autoload_static.php --exclude 3rdparty/composer/autoload_static.php .
  49. when:
  50. matrix:
  51. TESTS: syntax-php7.0
  52. litmus-v1:
  53. image: nextcloudci/litmus-php7.0:litmus-php7.0-2
  54. commands:
  55. - bash tests/travis/install.sh sqlite
  56. - bash apps/dav/tests/travis/litmus-v1/script.sh
  57. when:
  58. matrix:
  59. TESTS: litmus-v1
  60. litmus-v2:
  61. image: nextcloudci/litmus-php7.0:litmus-php7.0-2
  62. commands:
  63. - bash tests/travis/install.sh sqlite
  64. - bash apps/dav/tests/travis/litmus-v2/script.sh
  65. when:
  66. matrix:
  67. TESTS: litmus-v2
  68. caldavtester:
  69. image: nextcloudci/litmus-php7.0:litmus-php7.0-2
  70. commands:
  71. - bash tests/travis/install.sh sqlite
  72. - bash apps/dav/tests/travis/caldav/install.sh
  73. - bash apps/dav/tests/travis/caldav/script.sh
  74. when:
  75. matrix:
  76. TESTS: caldavtester
  77. carddavtester:
  78. image: nextcloudci/litmus-php7.0:litmus-php7.0-2
  79. commands:
  80. - bash tests/travis/install.sh sqlite
  81. - bash apps/dav/tests/travis/carddav/install.sh
  82. - bash apps/dav/tests/travis/carddav/script.sh
  83. when:
  84. matrix:
  85. TESTS: carddavtester
  86. nodb-php5.6:
  87. image: nextcloudci/php5.6:php5.6-2
  88. commands:
  89. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  90. when:
  91. matrix:
  92. DB: NODB
  93. PHP: 5.6
  94. nodb-php7.0:
  95. image: nextcloudci/php7.0:php7.0-2
  96. commands:
  97. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  98. when:
  99. matrix:
  100. DB: NODB
  101. PHP: "7.0"
  102. nodb-php7.1:
  103. image: nextcloudci/php7.1:php7.1-5
  104. commands:
  105. - NOCOVERAGE=true TEST_SELECTION=NODB ./autotest.sh sqlite
  106. when:
  107. matrix:
  108. DB: NODB
  109. PHP: 7.1
  110. sqlite-php5.6:
  111. image: nextcloudci/php5.6:php5.6-2
  112. commands:
  113. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  114. when:
  115. matrix:
  116. DB: sqlite
  117. PHP: 5.6
  118. sqlite-php7.0:
  119. image: nextcloudci/php7.0:php7.0-2
  120. commands:
  121. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  122. when:
  123. matrix:
  124. DB: sqlite
  125. PHP: "7.0"
  126. sqlite-php7.1:
  127. image: nextcloudci/php7.1:php7.1-5
  128. commands:
  129. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh sqlite
  130. when:
  131. matrix:
  132. DB: sqlite
  133. PHP: 7.1
  134. mysql-php5.6:
  135. image: nextcloudci/php5.6:php5.6-2
  136. commands:
  137. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysql
  138. when:
  139. matrix:
  140. DB: mysql
  141. PHP: 5.6
  142. postgres-php5.6:
  143. image: nextcloudci/php5.6:php5.6-2
  144. commands:
  145. - sleep 10 # gives the database enough time to initialize
  146. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh pgsql
  147. when:
  148. matrix:
  149. DB: postgres
  150. PHP: 5.6
  151. mysqlmb4-php5.6:
  152. image: nextcloudci/php5.6:php5.6-2
  153. commands:
  154. - NOCOVERAGE=true TEST_SELECTION=DB ./autotest.sh mysqlmb4
  155. when:
  156. matrix:
  157. DB: mysqlmb4
  158. PHP: 5.6
  159. integration-capabilities_features:
  160. image: nextcloudci/integration-php7.0:integration-php7.0-1
  161. commands:
  162. - ./occ maintenance:install --admin-pass=admin
  163. - cd build/integration
  164. - ./run.sh capabilities_features/capabilities.feature
  165. when:
  166. matrix:
  167. TESTS: integration-capabilities_features
  168. integration-federation_features:
  169. image: nextcloudci/integration-php7.0:integration-php7.0-1
  170. commands:
  171. - ./occ maintenance:install --admin-pass=admin
  172. - cd build/integration
  173. - ./run.sh federation_features/federated.feature
  174. when:
  175. matrix:
  176. TESTS: integration-federation_features
  177. integration-auth:
  178. image: nextcloudci/integration-php7.0:integration-php7.0-1
  179. commands:
  180. - ./occ maintenance:install --admin-pass=admin
  181. - cd build/integration
  182. - ./run.sh features/auth.feature
  183. when:
  184. matrix:
  185. TESTS: integration-auth
  186. integration-carddav:
  187. image: nextcloudci/integration-php7.0:integration-php7.0-1
  188. commands:
  189. - ./occ maintenance:install --admin-pass=admin
  190. - cd build/integration
  191. - ./run.sh features/carddav.feature
  192. when:
  193. matrix:
  194. TESTS: integration-carddav
  195. integration-dav-v2:
  196. image: nextcloudci/integration-php7.0:integration-php7.0-1
  197. commands:
  198. - ./occ maintenance:install --admin-pass=admin
  199. - cd build/integration
  200. - ./run.sh features/dav-v2.feature
  201. when:
  202. matrix:
  203. TESTS: integration-dav-v2
  204. integration-ocs-v1:
  205. image: nextcloudci/integration-php7.0:integration-php7.0-1
  206. commands:
  207. - ./occ maintenance:install --admin-pass=admin
  208. - cd build/integration
  209. - ./run.sh features/ocs-v1.feature
  210. when:
  211. matrix:
  212. TESTS: integration-ocs-v1
  213. integration-sharing-v1:
  214. image: nextcloudci/integration-php7.0:integration-php7.0-1
  215. commands:
  216. - ./occ maintenance:install --admin-pass=admin
  217. - cd build/integration
  218. - ./run.sh features/sharing-v1.feature
  219. when:
  220. matrix:
  221. TESTS: integration-sharing-v1
  222. integration-checksums-v1:
  223. image: nextcloudci/integration-php7.0:integration-php7.0-1
  224. commands:
  225. - ./occ maintenance:install --admin-pass=admin
  226. - cd build/integration
  227. - ./run.sh features/checksums.feature
  228. when:
  229. matrix:
  230. TESTS: integration-checksums
  231. integration-external-storage:
  232. image: nextcloudci/integration-php7.0:integration-php7.0-1
  233. commands:
  234. - ./occ maintenance:install --admin-pass=admin
  235. - cd build/integration
  236. - ./run.sh features/external-storage.feature
  237. when:
  238. matrix:
  239. TESTS: integration-external-storage
  240. integration-provisioning-v1:
  241. image: nextcloudci/integration-php7.0:integration-php7.0-1
  242. commands:
  243. - ./occ maintenance:install --admin-pass=admin
  244. - cd build/integration
  245. - ./run.sh features/provisioning-v1.feature
  246. when:
  247. matrix:
  248. TESTS: integration-provisioning-v1
  249. integration-tags:
  250. image: nextcloudci/integration-php7.0:integration-php7.0-1
  251. commands:
  252. - ./occ maintenance:install --admin-pass=admin
  253. - cd build/integration
  254. - ./run.sh features/tags.feature
  255. when:
  256. matrix:
  257. TESTS: integration-tags
  258. integration-caldav:
  259. image: nextcloudci/integration-php7.0:integration-php7.0-1
  260. commands:
  261. - ./occ maintenance:install --admin-pass=admin
  262. - cd build/integration
  263. - ./run.sh features/caldav.feature
  264. when:
  265. matrix:
  266. TESTS: integration-caldav
  267. integration-comments:
  268. image: nextcloudci/integration-php7.0:integration-php7.0-1
  269. commands:
  270. - ./occ maintenance:install --admin-pass=admin
  271. - cd build/integration
  272. - ./run.sh features/comments.feature
  273. when:
  274. matrix:
  275. TESTS: integration-comments
  276. integration-favorites:
  277. image: nextcloudci/integration-php7.0:integration-php7.0-1
  278. commands:
  279. - ./occ maintenance:install --admin-pass=admin
  280. - cd build/integration
  281. - ./run.sh features/favorites.feature
  282. when:
  283. matrix:
  284. TESTS: integration-favorites
  285. integration-provisioning-v2:
  286. image: nextcloudci/integration-php7.0:integration-php7.0-1
  287. commands:
  288. - ./occ maintenance:install --admin-pass=admin
  289. - cd build/integration
  290. - ./run.sh features/provisioning-v2.feature
  291. when:
  292. matrix:
  293. TESTS: integration-provisioning-v2
  294. integration-webdav-related:
  295. image: nextcloudci/integration-php7.0:integration-php7.0-1
  296. commands:
  297. - ./occ maintenance:install --admin-pass=admin
  298. - cd build/integration
  299. - ./run.sh features/webdav-related.feature
  300. when:
  301. matrix:
  302. TESTS: integration-webdav-related
  303. integration-sharees-features:
  304. image: nextcloudci/integration-php7.0:integration-php7.0-1
  305. commands:
  306. - ./occ maintenance:install --admin-pass=admin
  307. - cd build/integration
  308. - ./run.sh sharees_features/sharees.feature
  309. when:
  310. matrix:
  311. TESTS: integration-sharees-features
  312. nodb-codecov:
  313. image: nextcloudci/php7.0:php7.0-2
  314. commands:
  315. - TEST_SELECTION=NODB ./autotest.sh sqlite
  316. - wget https://codecov.io/bash -O codecov.sh
  317. - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  318. - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  319. when:
  320. matrix:
  321. TESTS: nodb-codecov
  322. db-codecov:
  323. image: nextcloudci/php7.0:php7.0-2
  324. commands:
  325. - TEST_SELECTION=QUICKDB ./autotest.sh sqlite
  326. - wget https://codecov.io/bash -O codecov.sh
  327. - sh -c "if [ '$DRONE_BUILD_EVENT' = 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -P $DRONE_PULL_REQUEST -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  328. - sh -c "if [ '$DRONE_BUILD_EVENT' != 'pull_request' ]; then bash codecov.sh -B $DRONE_BRANCH -C $DRONE_COMMIT -t 117641e2-a9e8-4b7b-984b-ae872d9b05f5 -f tests/autotest-clover-sqlite.xml; fi"
  329. when:
  330. matrix:
  331. TESTS: db-codecov
  332. matrix:
  333. include:
  334. - TESTS: signed-off-check
  335. - TESTS: nodb-codecov
  336. - TESTS: db-codecov
  337. - TESTS: integration-capabilities_features
  338. - TESTS: integration-federation_features
  339. - TESTS: integration-auth
  340. - TESTS: integration-carddav
  341. - TESTS: integration-dav-v2
  342. - TESTS: integration-ocs-v1
  343. - TESTS: integration-sharing-v1
  344. - TESTS: integration-checksums
  345. - TESTS: integration-external-storage
  346. - TESTS: integration-provisioning-v1
  347. - TESTS: integration-tags
  348. - TESTS: integration-caldav
  349. - TESTS: integration-comments
  350. - TESTS: integration-favorites
  351. - TESTS: integration-provisioning-v2
  352. - TESTS: integration-webdav-related
  353. - TESTS: integration-sharees-features
  354. - TESTS: jsunit
  355. - TESTS: check-autoloader
  356. - TESTS: app-check-code
  357. - TESTS: syntax-php5.6
  358. - TESTS: syntax-php7.0
  359. - TESTS: litmus-v1
  360. - TESTS: litmus-v2
  361. - TESTS: caldavtester
  362. - TESTS: carddavtester
  363. - DB: NODB
  364. PHP: 5.6
  365. - DB: NODB
  366. PHP: 7.0
  367. - DB: NODB
  368. PHP: 7.1
  369. - DB: sqlite
  370. PHP: 5.6
  371. - DB: sqlite
  372. PHP: 7.0
  373. - DB: sqlite
  374. PHP: 7.1
  375. - DB: mysql
  376. PHP: 5.6
  377. - DB: postgres
  378. PHP: 5.6
  379. - DB: mysqlmb4
  380. PHP: 5.6
  381. services:
  382. cache:
  383. image: redis
  384. postgres:
  385. image: postgres
  386. environment:
  387. - POSTGRES_USER=oc_autotest
  388. - POSTGRES_PASSWORD=oc_autotest
  389. when:
  390. matrix:
  391. DB: postgres
  392. mysql:
  393. image: mysql
  394. environment:
  395. - MYSQL_ROOT_PASSWORD=owncloud
  396. - MYSQL_USER=oc_autotest
  397. - MYSQL_PASSWORD=owncloud
  398. - MYSQL_DATABASE=oc_autotest
  399. when:
  400. matrix:
  401. DB: mysql
  402. mysqlmb4:
  403. image: mysql
  404. environment:
  405. - MYSQL_ROOT_PASSWORD=owncloud
  406. - MYSQL_USER=oc_autotest
  407. - MYSQL_PASSWORD=owncloud
  408. - MYSQL_DATABASE=oc_autotest
  409. command: [ "--innodb_large_prefix=true", "--innodb_file_format=barracuda", "--innodb_file_per_table=true" ]
  410. when:
  411. matrix:
  412. DB: mysqlmb4